-
Download or clone this repo.
-
Navigate to the Sinatra directory
-
From inside that directory, run
ruby server.rb
in the command line. -
Naviage to this example in your favorite browser. If a chart appears, you're set!
-
Change the
title
parameter in the path to be equal toMy+New+Chart
. The pluses get interpretted as spaces on the client side. Your path should now look like this...localhost:4567/?title=My+New+Chart&type=line&series=[[1,4,3,12,33,16,42,97]]
Did the title update in your chart? Whoa! Cool! -
Change the
type
parameter in the path to equalbar
. The path should now look like this...localhost:4567/?title=My+New+Chart&type=bar&series=[[1,4,3,12,33,16,42,97]]
Did the chart change to a bar chart? How slick! -
Try adding a new array of values to the path. It should look like this...
localhost:4567/?title=My+New+Chart&type=bar&series=[[1,4,3,12,33,16,42,97],[* NEW VALUES GO IN HERE *]]
Your chart should now have a second series of data. Coolio!
-
Download or clone this repo.
-
Navigate to the Sinatra directory
-
From inside that directory, run
ruby server.rb
in the command line. -
Naviage to this JSON example in your favorite browser. If a chart appears, you're set!
-
Want to use your own chart? Copy your JSON (or any JSON your find on our site and paste into this form. It will take the JSON and URI encode it.
-
Replace the existing info after
localhost:4567/json/
with the formatted info. Navigate to that address. -
If everything worked, you should have a new chart!