Scatter chart duplicates same values on x-axis

16 views
Skip to first unread message

Ganesh Gadge

unread,
Jan 10, 2018, 3:36:17 AM1/10/18
to Google Visualization API

i'm drawing a scatter chart using ajax call. Some of values are duplicate on x-axis while y-axis values are different.

Example -


{ "cols": [ {"id":"","label":"Sold Year","pattern":"","type":"string"}, {"id":"","label":"Unit Price","pattern":"","type":"number"} ], "rows": [{"c":[{"v":"2006","f":null},{"v":"0","f":"$0"}]},{"c":[{"v":"2007","f":null},{"v":"0","f":"$0"}]},{"c":[{"v":"2008","f":null},{"v":"0","f":"$0"}]},{"c":[{"v":"2009","f":null},{"v":"0","f":"$0"}]},{"c":[{"v":"2010","f":null},{"v":"0","f":"$0"}]},{"c":[{"v":"2011","f":null},{"v":"0","f":"$0"}]},{"c":[{"v":"2012","f":null},{"v":"0","f":"$0"}]},{"c":[{"v":"2013","f":null},{"v":"0","f":"$0"}]},{"c":[{"v":"2014","f":null},{"v":"0","f":"$0"}]},{"c":[{"v":"2015","f":null},{"v":"10700","f":"$10,700"}]},{"c":[{"v":"2015","f":null},{"v":"1280","f":"$1,280"}]},{"c":[{"v":"2016","f":null},{"v":"2500","f":"$2,500"}]},{"c":[{"v":"2016","f":null},{"v":"80500","f":"$80,500"}]},]}


In above example values for years on x-axis are duplicate (Year 2015 & 2016). The scatter chart draws 2 points for 2015 & same for 2016.

I want to show single x-axis value with different y-axis values.

The chart out put should be like -





Any help is appreciated. Thanks
Reply all
Reply to author
Forward
0 new messages