Line charts without any number sorting

11 views
Skip to first unread message

Sergey Filatov

unread,
Jun 25, 2017, 3:21:27 PM6/25/17
to Google Visualization API
i need to create line like this:

[[0, 15], [10, -50], [6, -56.5], [22, -46.5], [11, -22.1], [50, -2.5], [60, -27.7], [70, -55.7], [80, -76.5]]

both values are number type

but google chart always sorts data

how can i disable any sorting ?

Daniel LaLiberte

unread,
Jun 25, 2017, 10:45:00 PM6/25/17
to Google Visualization API
If you want your domain values to be unsorted (on the horizontal axis), use strings instead of numbers.  e.g. 

[['0', 15], ['10', -50], ['6', -56.5], ['22', -46.5], ['11', -22.1], ['50', -2.5], ['60', -27.7], ['70', -55.7], ['80', -76.5]]

If that is not what you are thinking of, please be more specific.  Maybe do a hand drawing of what the chart should look like.

--
You received this message because you are subscribed to the Google Groups "Google Visualization API" group.
To unsubscribe from this group and stop receiving emails from it, send an email to google-visualization-api+unsub...@googlegroups.com.
To post to this group, send email to google-visualization-api@googlegroups.com.
Visit this group at https://groups.google.com/group/google-visualization-api.
To view this discussion on the web visit https://groups.google.com/d/msgid/google-visualization-api/8651fdc7-ae6e-4afb-bd87-62db88bad40e%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.



--
Reply all
Reply to author
Forward
0 new messages