niucang / gchartrb

Automatically exported from code.google.com/p/gchartrb
0 stars 0 forks source link

Text shape_markers are unsupported #8

Closed GoogleCodeExporter closed 8 years ago

GoogleCodeExporter commented 8 years ago
What steps will reproduce the problem?
1. Create a bar chart
2. Try add a shape_marker (with the type :text)

See http://code.google.com/apis/chart/#shape_markers
I am using version 0.8.

Original issue reported on code.google.com by harmaa...@gmail.com on 3 May 2008 at 2:14

GoogleCodeExporter commented 8 years ago
I think this was added in the latest release a month or so ago. I haven't had 
time 
to put in the features in the new release.

Will do so soon.

Original comment by deepak.j...@gmail.com on 4 May 2008 at 12:23

GoogleCodeExporter commented 8 years ago
The latest commit on github contains the text shape marker feature. However, I 
have 
rewritten the entire library to make it more ruby-ish, and to fix some design 
mistakes I made initially.

We are still a bit far from a proper release, because I need to add a lot of 
docs, 
and a couple of minor features.

You can get some good idea of the syntax from at http://github.com/deepakjois/
gchartrb/commit/0edba9041765e2217a3c20dd2ad48513d3baa609#L7R1

As for the text marker.. here is a snippet
# Bar Chart
GoogleChart::BarChart.new do |bc|
  bc.title = "Bar Chart"
  bc.width = 800
  bc.height = 200
  bc.orientation = :vertical
  bc.grouping = :grouped

  bc.data "Trend 1", [5,4,3,1,3,5], '0000ff'
  bc.data "Trend 2", [1,2,3,4,5,6], 'ff0000'
  bc.data "Trend 3", [6,5,4,4,5,6], '00ff00'

  bc.bar_width = 5
  bc.bar_spacing = 2
  bc.group_spacing = 10

  bc.shape_marker :text, :text => "Test", :color => "000000" ,:data_set => 
0, :data_point => 1, :size => 14

  puts "\nBar Chart"
  puts bc.to_url
end

Original comment by deepak.j...@gmail.com on 20 May 2008 at 11:25

GoogleCodeExporter commented 8 years ago

Original comment by deepak.j...@gmail.com on 20 May 2008 at 11:26