Support » Plugin: Inline Google Spreadsheet Viewer » Combo Chart – Data Labels

  • Resolved ldcruz

    (@ldcruz)


    Hi,
    I’m trying to figure out how to add the data label in the combo chart.
    I could not find a clear example to do this with your plugin.
    I tried: chart_annotations = ‘”1″:{“style”:”bar”,”role”:”annotation”},”2″:{“role”:”annotationText”}}’ and did not work.
    I tried using the annotations inside the chart_series and it did not work.
    I’ve seen several examples using the following commands:
    data.addColumn ({type: ‘string’, role: ‘annotation’});
    data.addColumn ({type: ‘string’, role: ‘annotationText’});
    I could not figure out how to use them in your plugin.

    Any help is welcome.

Viewing 2 replies - 1 through 2 (of 2 total)
  • Plugin Author Meitar

    (@meitar)

    I’m not sure I understand what you’re trying to do, but this:

    chart_annotations = '"1":{"style":"bar","role":"annotation"},"2":{"role":"annotationText"}}'

    is clearly broken. This starting sequence ("1":) isn’t even valid JSON, so it’s not going to work. At a minimum, you need to ensure your braces and quotes are balanced; i.e., you are missing the starting brace. Refer to the JSON documentation for complete syntax reference.

    Sorry my bad.
    chart_annotations = ‘{“1”:{“style”:”bar”,”role”:”annotation”},”2″:{“role”:”annotationText”}}’

    It’s not working any way, on google sheets I create a chart and on Series option I just click on Data Label and data information apears on bar charts without need to mouse hover.

    thanks for reply

Viewing 2 replies - 1 through 2 (of 2 total)
  • You must be logged in to reply to this topic.