PDA

View Full Version : Line Chart Legend



jason199x
2 Feb 2012, 3:39 PM
Hey everyone!
I am using a line chart to graph multiple sets of data. One of the problems I have been running into is that the sprites to indicate the color of each line in the legend have a height of 1px. I'd prefer not to have to use the markers for each node. I was looking through the forums and around Google for a while and wasn't able to find a way of changing this little sprite to be thicker. Any advice? Thanks!
-Jason

mitchellsimoens
3 Feb 2012, 6:21 AM
Looking through the source for LegendItem, I saw that the stroke-width of the item for a line series is driven off of the lineWidth parameter of the line series. This is undocumented but I added lineWidth : 5 to a line series and the line was then 5 pixels wide.

If you and edit Line.js from the charts examples folder to add lineWidth : 5 to the line series and load Line.html you should see a difference.

jason199x
3 Feb 2012, 11:25 AM
Thanks! That worked perfectly.