|
Display NonPlotted Data in DataPoint Label |
Posted by Randy on Apr-10-2014 22:42 |
|
Peter,
I am using a X-Y Scatter Chart to plot contract ratings (Y axis) versus Date (X axis). When the user clicks a data point the Rating and Date are displayed. What I need is to add the Contract Number (a non-plotted array) to the label. I am using CD 5.1 and ColdFusion10.
This is the current code for the chart tool tip:
// Include tool tip for the chart
imageMap1 = c.getHTMLImageMap("", "",
"title='[{dataSetName}] Date = {x|mm/dd/yyyy} , Rating = {value} '");
I need to add this array:
contractlabels = datacontract;
The expected format of the tool tip is:
"title='[{dataSetName}] Contract = {contractlabels}, Date = {x|mm/dd/yyyy} , Rating = {value} '");
When I add it like this I only receive the first Contract Number for all datapoints.
Thank you in advance,
Randy |
Re: Display NonPlotted Data in DataPoint Label |
Posted by Peter Kwan on Apr-12-2014 00:02 |
|
Hi Randy,
You should have an array of text strings representing the contract numbers. The number of
elements in the array should be the same as the number of points on the scatter chart. The
code is then:
//add an additional field to the scatter layer that contains the data points
myScatterLayer.addExtraField(myArrayOfContractNumbers);
The extra field can be used in the image map as {field0}, like:
// Include tool tip for the chart
imageMap1 = c.getHTMLImageMap("", "",
"title='[{dataSetName}] Contract = {field0}, Date = {x|mm/dd/yyyy} , Rating = {value}
'");
Hope this can help.
Regards
Peter Kwan |
|