Permalink
Browse files

[enhance] gcharts: BarChart used instead of ImageBarChart

  • Loading branch information...
1 parent 2323cd6 commit 716604ba76c529e6e27804537c3e17426c655a3e Nicolas Glondu committed Nov 22, 2011
Showing with 10 additions and 5 deletions.
  1. +2 −2 plugins/gcharts/gcharts.js
  2. +3 −3 plugins/gcharts/jschecker_gcharts.js
  3. +5 −0 stdlib/tools/gcharts/gcharts.opa
@@ -23,8 +23,8 @@ function genericDynamicLoad(id, pack, str_data, str_opts, gfun) {
##args(id, str_data, str_opts)
{
genericDynamicLoad(
- id, ["imagebarchart"], str_data, str_opts,
- function(v){return new google.visualization.ImageBarChart(v)});
+ id, ["corechart"], str_data, str_opts,
+ function(v){return new google.visualization.BarChart(v)});
}
##register draw_column_chart : string, string, string -> void
@@ -7,6 +7,9 @@ google.prototype = {
AreaChart : {
draw : null
},
+ BarChart : {
+ draw : null
+ },
ColumnChart : {
draw : null
},
@@ -19,9 +22,6 @@ google.prototype = {
IntensityMap : {
draw : null
},
- ImageBarChart : {
- draw : null
- },
LineChart : {
draw : null
},
@@ -139,6 +139,7 @@ type GCharts.option =
/ { header_height : int }
/ { font_color : color }
/ { show_scale : bool }
+ / { curve_type : {none}/{function} }
/ { default_series_type : GCharts.series_type }
/ { series : list((int, list(GCharts.series_options))) } // (Affected series, options)
@@ -228,6 +229,10 @@ type GCharts.option =
| ~{header_height} -> ("headerHeight", {Int=header_height})
| ~{font_color} -> ("fontColor", aux_color(font_color))
| ~{show_scale} -> ("showScale", {Bool=show_scale})
+ | ~{curve_type} ->
+ ("curveType", match curve_type with
+ | {none} -> {String="none"}
+ | {function} -> {String="function"})
| ~{default_series_type} -> ("seriesType", aux_series_type(default_series_type))
| ~{series} -> ("series", {Record=List.map(

0 comments on commit 716604b

Please sign in to comment.