when chart refreshes, legend duplicates for each refresh

12 views
Skip to first unread message

dv

unread,
Jan 12, 2012, 10:37:56 AM1/12/12
to Google Visualization API
Hey all,

Notice in this code:

http://jsfiddle.net/johnmerlino/xBmz4/

how when the bar chart on bottom refreshes, the legend regenerates. I
dont know why. I dont want the legend to duplicate.

Thanks for response.

asgallant

unread,
Jan 12, 2012, 10:50:35 AM1/12/12
to google-visua...@googlegroups.com
It looks like every time you call the #parseData method, you are adding new columns to the DataTable, which would create new legend entries when you redraw.  I suspect that you don't actually want extra columns; if so, you should set up your DataTable object once, and then update its contents only with #parseData.
Reply all
Reply to author
Forward
0 new messages