svenna
2 Feb 2012, 3:22 AM
Sencha Designer build 268.
ExtJs 4.07A
Im trying to configure a tips object.
Ext.chart.series.Line.tips.
In the properties I enter e.g
{
trackMouse: true,
width: 140,
height: 70,
renderer: function(storeItem,item) {
this.setTitle('Ugh');
}
}
However the result is without ' around Ugh
Ext.define('Dagsomsetning.view.base.MyLineSeries', {
extend: 'Ext.chart.series.Line',
constructor: function(cfg) {
var me = this;
cfg = cfg || {};
me.callParent([Ext.apply({
type: 'line',
tips: {
trackMouse: true,
width: 140,
height: 70,
renderer: function(storeItem,
item){
this.setTitle(Ugh);
}
},
title: 'Ordre',
xField: 'dato',
yField: [
'ordresum'
],
fill: true
}, cfg)]);
}
});
Also stripping spacing:
{
trackMouse: true,
width: 140,
height: 70,
renderer: function(storeItem,item) {
var ugh = 'ugh';
this.setTitle('Ugh');
}
}
To:
Ext.define('Dagsomsetning.view.base.MyLineSeries', {
extend: 'Ext.chart.series.Line',
constructor: function(cfg) {
var me = this;
cfg = cfg || {};
me.callParent([Ext.apply({
type: 'line',
tips: {
trackMouse: true,
width: 140,
height: 70,
renderer: function(storeItem,
item){
varugh=ugh;this.setTitle(Ugh);
}
},
title: 'Ordre',
xField: 'dato',
yField: [
'ordresum'
],
fill: true
}, cfg)]);
}
});
Some times the ' and " is included in the code, I've been unable to find the logic, but:
{
trackMouse: true,
width: 140,
height: 70,
renderer: function(storeItem, item) {
this.setTitle(
Ext.Date.format(storeItem.get('dato'),"D d.m.Y") +
"<br />Ordre: " + Ext.util.Format.number(storeItem.get("ordresum"),"0.000/i") +
"<br />Fakturert: " + Ext.util.Format.number(storeItem.get("fakturasum"),"0.000/i")
);
}
}
"renders" to:
Ext.define('Dagsomsetning.view.base.MyLineSeries', {
extend: 'Ext.chart.series.Line',
constructor: function(cfg) {
var me = this;
cfg = cfg || {};
me.callParent([Ext.apply({
type: 'line',
tips: {
trackMouse: true,
width: 140,
height: 70,
renderer: function(storeItem,
item){
this.setTitle(Ext.Date.format(storeItem.get(dato),
Dd.m.Y)+<br/>Ordre: ' + Ext.util.Format.number(storeItem.get('ordresum'),'0.000/i') +
'<br/>Fakturert: ' + Ext.util.Format.number(storeItem.get('fakturasum'),'0.000/i')
);
}
},
title: 'Ordre',
xField: 'dato',
yField: [
'ordresum'
],
fill: true
}, cfg)]);
}
});
ExtJs 4.07A
Im trying to configure a tips object.
Ext.chart.series.Line.tips.
In the properties I enter e.g
{
trackMouse: true,
width: 140,
height: 70,
renderer: function(storeItem,item) {
this.setTitle('Ugh');
}
}
However the result is without ' around Ugh
Ext.define('Dagsomsetning.view.base.MyLineSeries', {
extend: 'Ext.chart.series.Line',
constructor: function(cfg) {
var me = this;
cfg = cfg || {};
me.callParent([Ext.apply({
type: 'line',
tips: {
trackMouse: true,
width: 140,
height: 70,
renderer: function(storeItem,
item){
this.setTitle(Ugh);
}
},
title: 'Ordre',
xField: 'dato',
yField: [
'ordresum'
],
fill: true
}, cfg)]);
}
});
Also stripping spacing:
{
trackMouse: true,
width: 140,
height: 70,
renderer: function(storeItem,item) {
var ugh = 'ugh';
this.setTitle('Ugh');
}
}
To:
Ext.define('Dagsomsetning.view.base.MyLineSeries', {
extend: 'Ext.chart.series.Line',
constructor: function(cfg) {
var me = this;
cfg = cfg || {};
me.callParent([Ext.apply({
type: 'line',
tips: {
trackMouse: true,
width: 140,
height: 70,
renderer: function(storeItem,
item){
varugh=ugh;this.setTitle(Ugh);
}
},
title: 'Ordre',
xField: 'dato',
yField: [
'ordresum'
],
fill: true
}, cfg)]);
}
});
Some times the ' and " is included in the code, I've been unable to find the logic, but:
{
trackMouse: true,
width: 140,
height: 70,
renderer: function(storeItem, item) {
this.setTitle(
Ext.Date.format(storeItem.get('dato'),"D d.m.Y") +
"<br />Ordre: " + Ext.util.Format.number(storeItem.get("ordresum"),"0.000/i") +
"<br />Fakturert: " + Ext.util.Format.number(storeItem.get("fakturasum"),"0.000/i")
);
}
}
"renders" to:
Ext.define('Dagsomsetning.view.base.MyLineSeries', {
extend: 'Ext.chart.series.Line',
constructor: function(cfg) {
var me = this;
cfg = cfg || {};
me.callParent([Ext.apply({
type: 'line',
tips: {
trackMouse: true,
width: 140,
height: 70,
renderer: function(storeItem,
item){
this.setTitle(Ext.Date.format(storeItem.get(dato),
Dd.m.Y)+<br/>Ordre: ' + Ext.util.Format.number(storeItem.get('ordresum'),'0.000/i') +
'<br/>Fakturert: ' + Ext.util.Format.number(storeItem.get('fakturasum'),'0.000/i')
);
}
},
title: 'Ordre',
xField: 'dato',
yField: [
'ordresum'
],
fill: true
}, cfg)]);
}
});