Hi!
Is it possible to add some custom data fields to series?
What I want is if I have such fields:
datafields: [{ name: 'Date', type: 'date' }, { name: 'price-actual'}
, { name: 'myData1'}, { name: 'price-close1'}, {name: 'price-open1'}
, { name: 'myData2'}, { name: 'price-close2'}, {name: 'price-open2'}
],
and these series groups:
var mySeriesGroups = [{
type: 'candlestick',
toolTipFormatFunction: toolTipCustomFormatFn,
series: [{ displayText: '1-st away', lineColor: '#993300', fillColor: '#993300',
dataFieldClose: 'price-close1', dataFieldOpen:'price-open1',
dataFieldHigh: 'price-close1', dataFieldLow:'price-open1'}]
}, {
type: 'candlestick',
toolTipFormatFunction: toolTipCustomFormatFn,
series: [{ displayText: '2-nd away', lineColor: '#333300', fillColor: '#333300',
dataFieldClose: 'price-close2', dataFieldOpen: 'price-open2',
dataFieldHigh: 'price-close2', dataFieldLow: 'price-open2'}]
}];
how would I read “myData1” and “myData2” inside toolTipCustomFormatFn function?
If I just add them as fields to series, like this:
series: [{ displayText: '2-nd away', lineColor: '#333300', fillColor: '#333300',
dataFieldClose: 'price-close2', dataFieldOpen: 'price-open2', <strong>myData: 'myData2'</strong>,
dataFieldHigh: 'price-close2', dataFieldLow: 'price-open2'}]
I will get a string with ‘myData2’ value when I try to read serie.myData in toolTipCustomFormatFn function instead of an actual data.