Exemple ProtoChart’s Tent…
Le blog deensoft propose un petit tutoriel d’utilisation de ProtoChart.
J’ai fait quelques corrections dans le plugin ProtoChart’s Tent. Voici le code à utiliser dans votre vue Bivouac pour obtenir le même résultat.
-
#
-
# Project ProtoChartTest
-
#
-
# Created using bivouac on Thu Jul 31 19:35:10 +0200 2008.
-
# Copyright (c) 2008 __My__. All rights reserved.
-
#
-
-
module ProtoChartTest::Views
-
def pc_test
-
h1.header { "ProtoChart’s Tent example" }
-
-
div :id => "chart", :style => "width:500px;height:300px"
-
-
protochart( "chart",
-
"Ajaxian" => [[1, 996], [2, 1162], [3, 102], [4, 491], [5, 75]],
-
"Ajax" => [[1, 307], [2, 2184], [3, 436], [4, 304], [5, 152]],
-
:xaxis => {
-
:min => 0,
-
:max => 6,
-
:ticks => [
-
[0, ""],
-
[1, "Good"],
-
[2, "All"] ,
-
[3, "Avg Month"],
-
[4, "Great"],
-
[5, "Best"],
-
[6, " "]
-
]
-
},
-
:legend => { :show => true },
-
:points => { :show => true },
-
:lines => { :show => true }
-
)
-
-
end
-
end
-





[...] starters I found an interesting post on how to use ProtoChart via Ruby On Rails at http://greg.rubyfr.net/pub/?p=506 very interesting [...]
Ping par How are you using ProtoChart? :: Deensoft — Vendredi 15 août 2008 @ 16:02