|
extraField, HTMLImageMap and multi color bar layer |
Posted by Gerrit Scholz on Nov-25-2010 22:05 |
|
Hi Peter,
I use extra fields to add data for the HTML image map.
I create the bar layer with ?dataLayer = chart.addBarLayer2(Chart.Side, 0);? .
Add one data set with 3 values ?dataLayer.addDataSet(data)?.
Add an extra field with 3 values ?dataLayer.addExtraField(extraFields);?
The extra field holds the ?onClick? action.
Then I create an HTML image map that uses the extra field data:
chart.getHTMLImageMap(" ", "", "onClick={dsdiField0}");
Everything works fine I get a HTML image map with 3 area lines and the {dsdiField0} is replaced by the extra field data.
Now I need a clickable multi color bar layer.
I create the bar layer with ?dataLayer = chart.addBarLayer3(data, colors);?.
Add an extra field with 3 values ?dataLayer.addExtraField(extraFields);?
Then I create an HTML image map that uses the extra field data:
chart.getHTMLImageMap(" ", "", "onClick={dsdiField0}");
I get a HTML image map with 3 area lines, but only in the last line the {dsdiField0} is replaced by the extra field data.
Why is the {dsdiField0} in the first two rows not replaced?
Regards
Gerrit |
Re: extraField, HTMLImageMap and multi color bar layer |
Posted by Peter Kwan on Nov-26-2010 00:20 |
|
Hi Gerrit,
You may use {field0} instead of {dsdiField0}. The {field0} should work for both of your cases.
Hope this can help.
Regards
Peter Kwan |
|