It is currently Thu Nov 15, 2018 9:52 pm Advanced search

What format does Json data need to be in

Help for using the Highslide Editor, the visual way of setting up Highslide.

What format does Json data need to be in

Postby twilly » Sat Dec 03, 2016 12:55 am

I am trying to use json data in the editor, how do I format data so that I can use the editor?

Currently using the following


[[4.000000000000000],[23.000000000000000],[2.000000000000000],[30.000000000000000],[60.000000000000000],[70.000000000000000],[9.000000000000000],[4.000000000000000],[7.000000000000000],[3.000000000000000],[360.000000000000000],[60.000000000000000],[200.000000000000000],[50.000000000000000],[2.000000000000000],[2.000000000000000],[1.000000000000000],[2.000000000000000],[1.000000000000000],[3.000000000000000],[2.000000000000000],[2.000000000000000],[2.000000000000000],[4.000000000000000],[2.000000000000000],[5.000000000000000],[1.000000000000000],[2.000000000000000],[26.000000000000000],[2.000000000000000],[2.000000000000000],[1.000000000000000],[2.000000000000000],[1.000000000000000],[1.000000000000000],[4.000000000000000],[4.000000000000000],[4.000000000000000],[2.000000000000000],[2.000000000000000],[8.000000000000000],[447.000000000000000],[1889.000000000000000],[1.000000000000000],[38.000000000000000],[32.000000000000000],[328.000000000000000],[90.000000000000000],[50.000000000000000],[100.000000000000000],[50.000000000000000],[50.000000000000000],[5.000000000000000],[60.000000000000000],[50.000000000000000],[2.000000000000000],[2.000000000000000],[4.000000000000000],[4.000000000000000],[4.000000000000000],[12.000000000000000],[1.000000000000000],[1.000000000000000],[1.000000000000000],[4.000000000000000],[1.000000000000000],[2.000000000000000],[110.000000000000000],[24.000000000000000],[1.000000000000000],[1.000000000000000],[2.000000000000000],[15.000000000000000],[2.000000000000000],[60.000000000000000],[60.000000000000000],[60.000000000000000],[2.000000000000000],[2.000000000000000],[160.000000000000000],[160.000000000000000],[160.000000000000000],[160.000000000000000],[160.000000000000000],[36.000000000000000],[9.000000000000000],[2.000000000000000],[2.000000000000000],[2.000000000000000],[2.000000000000000],[40.000000000000000],[40.000000000000000],[40.000000000000000],[2.000000000000000],[2.000000000000000],[2.000000000000000],[100.000000000000000],[50.000000000000000],[1.000000000000000],[12.000000000000000],[40.000000000000000]]
twilly
 
Posts: 3
Joined: Mon Feb 17, 2014 5:58 pm

Re: What format does Json data need to be in

Postby cpopolo » Sun Aug 26, 2018 7:41 pm

Assuming JavaScript, you already have a JavaScript array. Here are some transforms that might be helpful:

a = [[4.000000000000000],[23.000000000000000],[2.000000000000000]] // A short version of your array

b = JSON.stringify(a)
returns: "[[4],[23],[2]]"

c = JSON.parse(b)
returns a JSON representation of your array:
(3) [Array(1), Array(1), Array(1)]

Not sure if this answers your question, but the Firebug console is a great place to experiment with transformations and inspections of your data.
cpopolo
 
Posts: 18
Joined: Thu Feb 08, 2018 9:01 pm


Return to Highslide Editor

Who is online

Users browsing this forum: No registered users and 1 guest