0

H

I want to add numbers a top a bar graph using the goole chart api

what I want

That is what I want. It is an example from the home page. When I look at the options for bar charts I don't see it. I am not sure what it would be called but nothing I see looks like it(at least not from the example pictures).

chobo2
  • 83,322
  • 195
  • 530
  • 832

1 Answers1

0

The "|N,FF0000,-1,-1,10" on the above URL is the magic sauce that makes it work.

The Text and Data Value Markers documentation explains:

chm=<marker_type>,<color>,<series_index>,<opt_which_points>,<size>,<opt_z_order>,<opt_placement>.

Where <marker_type> in this case, is N.

John Gietzen
  • 48,783
  • 32
  • 145
  • 190
  • @ohn Gietzen - Ok I see. I guess the next question is what one would it be in this plugin? http://keith-wood.name/gChartRef.html#markers I not sure which of these choices I should be passing in. I am thinking placement but I am not sure how to pass it in. – chobo2 Feb 18 '11 at 23:55
  • @chobo2: You would use something like `$.gchart.marker('number', 'black')`. – John Gietzen Feb 19 '11 at 00:08
  • @ John Gietzen - Ya I i just fgured it out but what I am finding it only labels one bar. I want it to label every bar. I thought if I put 0 that would go to N but that does not seem to be the case. I also tried -1 but same thing. – chobo2 Feb 19 '11 at 00:09
  • @chobo2: Well, if you want to label more than one series, you either use -1 for the series number, or you add more instances of the marker, one for each series. – John Gietzen Feb 19 '11 at 00:12
  • I tried markers: [$.gchart.marker('number', 'red', -1,-1)] I want to go to N to I thought -1 would do it but it does not seem to be working. – chobo2 Feb 19 '11 at 00:15
  • @chobo2: You might want to post that as a separate question, tagged with the gChart tag. – John Gietzen Feb 19 '11 at 00:17
  • @John Gietzen - Ya probably would be better: http://stackoverflow.com/questions/5047947/how-to-label-my-bar-chart-with-numbers – chobo2 Feb 19 '11 at 00:23