Re: Custom Labels in Scatter Plot

68 views
Skip to first unread message

asgallant

unread,
Jan 9, 2013, 1:27:59 PM1/9/13
to google-visua...@googlegroups.com
The only way to get the axis values you want for your ratings would be to put them on the x-axis (effectively turning your chart on its side).  Then you could use a LineChart with the lineWidth option set to 0 and the pointSize option set to something larger than 0 to simulate a ScatterChart.  See an example here: http://jsfiddle.net/asgallant/Y6GJ9/

On Wednesday, January 9, 2013 12:38:46 AM UTC-5, Brian Pletcher wrote:
I have a somewhat unusual graphing need, and am hoping that the Google Visualization API might be able to do the trick. My X axis is time, and my Y axis is a "rating" (a continuous variable). However, this rating is always expressed to users as a non-numeric value (e.g. Rating value 1 = "A1", 2 = "A2", 3 = "B1" etc.) Is there any way to show these string values rather than the rating, but graph based on the numeric equivalency?

My initial look at the API revealed that only a continuous variable can be used on both axes of a scatter plot, and that the axis values are generated automatically, but I'm hoping there's some clever way around that. Any help would be much appreciated. Thanks!

Brian Pletcher

unread,
Jan 9, 2013, 2:10:23 PM1/9/13
to google-visua...@googlegroups.com
Hm, that's what I was afraid of! I guess I can try just drawing the chart myself with a <canvas>, not quite as slick but it'll be good practice. Thanks for the response!
Reply all
Reply to author
Forward
0 new messages