|
setDataSymbol for area chart |
Posted by Pete DeLine on Apr-07-2011 08:56 |
|
I would like to set data symbols at the various points in my area graph. Here is the code I am trying:
areaLayer = c.addAreaLayer(reads, c.yZoneColor(2, 0x8033ff33, 0x80ff3333))
readSet = areaLayer.getDataSet(0).setDataSymbol(ChartDirector::DiamondShape, 7, 0x44ff44, 0x008800, 2)
I would also like to have the symbol show up in the legend. As you can see, I am setting a zone for the Y axis.
Thanks for the help. |
Re: setDataSymbol for area chart |
Posted by Peter Kwan on Apr-07-2011 14:03 |
|
Hi Pete,
To enter a symbol into the legend, you may simply add an empty scatter layer with the symbol of your choice. As the scatter layer is empty, it will not affect your chart, apart from inserting a symbol in the legend box. You can then choose the color you want the symbol to appear. For example (in Ruby):
c.addScatterLayer(nil, nil, "My Name", ChartDirector::DiamondShape, 7, 0x44ff44, 0x008800)
Hope this can help.
Regards
Peter Kwan |
Re: setDataSymbol for area chart |
Posted by Pete DeLine on Apr-07-2011 16:28 |
|
This worked great.
How would I add the symbols to the data points for an area layer? |
Re: setDataSymbol for area chart |
Posted by Pete DeLine on Apr-07-2011 16:41 |
|
Never mind. I figure it out. I added my data values to the scatter layer. |
|