Skip to content
This repository
Browse code

[enhance] gcharts: BarChart used instead of ImageBarChart

  • Loading branch information...
commit 716604ba76c529e6e27804537c3e17426c655a3e 1 parent 2323cd6
authored November 22, 2011
4  plugins/gcharts/gcharts.js
@@ -23,8 +23,8 @@ function genericDynamicLoad(id, pack, str_data, str_opts, gfun) {
23 23
 ##args(id, str_data, str_opts)
24 24
 {
25 25
     genericDynamicLoad(
26  
-	id, ["imagebarchart"], str_data, str_opts,
27  
-	function(v){return new google.visualization.ImageBarChart(v)});
  26
+	id, ["corechart"], str_data, str_opts,
  27
+	function(v){return new google.visualization.BarChart(v)});
28 28
 }
29 29
 
30 30
 ##register draw_column_chart : string, string, string -> void
6  plugins/gcharts/jschecker_gcharts.js
@@ -7,6 +7,9 @@ google.prototype = {
7 7
 	AreaChart    : {
8 8
 	    draw : null
9 9
 	},
  10
+	BarChart : {
  11
+	    draw : null
  12
+	},
10 13
 	ColumnChart  : {
11 14
 	    draw : null
12 15
 	},
@@ -19,9 +22,6 @@ google.prototype = {
19 22
 	IntensityMap : {
20 23
 	    draw : null
21 24
 	},
22  
-	ImageBarChart : {
23  
-	    draw : null
24  
-	},
25 25
 	LineChart    : {
26 26
 	    draw : null
27 27
 	},
5  stdlib/tools/gcharts/gcharts.opa
@@ -139,6 +139,7 @@ type GCharts.option =
139 139
   / { header_height : int }
140 140
   / { font_color : color }
141 141
   / { show_scale : bool }
  142
+  / { curve_type : {none}/{function} }
142 143
 
143 144
   / { default_series_type : GCharts.series_type }
144 145
   / { series : list((int, list(GCharts.series_options))) } // (Affected series, options)
@@ -228,6 +229,10 @@ type GCharts.option =
228 229
       | ~{header_height} -> ("headerHeight", {Int=header_height})
229 230
       | ~{font_color} -> ("fontColor", aux_color(font_color))
230 231
       | ~{show_scale} -> ("showScale", {Bool=show_scale})
  232
+      | ~{curve_type} ->
  233
+        ("curveType", match curve_type with
  234
+          | {none} -> {String="none"}
  235
+          | {function} -> {String="function"})
231 236
 
232 237
       | ~{default_series_type} -> ("seriesType", aux_series_type(default_series_type))
233 238
       | ~{series} -> ("series", {Record=List.map(

0 notes on commit 716604b

Please sign in to comment.
Something went wrong with that request. Please try again.