0

I'm using Chartkick to display this map using the Google api:

geo_chart @final_output, library: {backgroundColor: "transparent", width: 400}

Right now if I pass it a string as the 2nd value it won't work. But an integer will.

[['Canada','cat'],['United States',4]]  <- first one won't work

Is there a way from rails to make this happen? I checked the google docs and chartkick and it does not mention it anywhere.

Thanks!

for Reference: https://developers.google.com/chart/interactive/docs/gallery/geochart#important

bcflow
  • 31
  • 8

1 Answers1

0

I think you are working in text mode, and in that case the second argument is the text size - so will need to be a number. From the documentation you link to:

Text mode format

The label is entered in the first column, plus one optional column:

Text label [String, Required] A specific string address (for example, "1600 Pennsylvania Ave"). Text size [Number, Optional] The second column is an optional numeric column used to assign the size of the label. If this column is not present, all labels will be the same size.

ReggieB
  • 8,100
  • 3
  • 38
  • 46