question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

chartType="Bar" ignoring options attribute

See original GitHub issue

Hi, I’m trying to disable the chart interactivity for chart type “Bar” without success.

options={{ enableInteractivity: false }}

For the chart type “BarChart” it is working fine, but not for type “Bar”

To reproduce, you can just access the link below, change the chartType from BarChart to Bar and then insert above options. https://codesandbox.io/s/github/rakannimer/react-google-charts/tree/master/sandboxes/bar-chart

is it really a issue or am I doing something wrong ?

Issue Analytics

  • State:open
  • Created 5 years ago
  • Comments:6 (1 by maintainers)

github_iconTop GitHub Comments

2reactions
jakesylvestrecommented, Apr 19, 2019

This works.

    const chartEvents = [
      {
        callback: ({ chartWrapper, google }) => {
          const chart = chartWrapper.getChart();
          chart.container.addEventListener("click", (ev) => console.log(ev))
        },
        eventName: "ready"
      }
    ];

    return (
      <span>
        <Typography variant="subtitle1" className={classes.label}>
          {title}
        </Typography>
        <div className={classes.chartContainer}>
          <Chart
            width={"100%"}
            height={"200px"}
            legendToggle
            chartType={"Bar"}
            loader={<Spinner />}
            data={data}
            chartEvents={chartEvents}
          />
        </div>
      </span>
2reactions
glautervlcommented, Mar 21, 2019

Hi @rakannimer

I got a column chart working fine disabling the enableInteractivity feature.

The problem is when you access this link: https://react-google-charts.com/column-chart It says “Same as BarChart” then you get back to bar chart, but on the github readme page you have a sandbox code / link https://github.com/rakannimer/react-google-charts/blob/master/sandboxes/column-chart/index.js where we can see another chart type “ColumnChart” and it works fine with that options.

Read more comments on GitHub >

github_iconTop Results From Across the Web

SPARKLINE - Google Docs Editors Help
Options are: "convert" and "ignore" . "rtl" determines whether or not the chart is rendered right to left. Options are true or false...
Read more >
Everything you ever wanted to know about Sparklines in ...
Use the “empty” option to determine whether blank cells in your dataset are rendered as 0 in your sparkline, or just ignored (the...
Read more >
chart tag syntax and attributes - IBM
Each tag can have one or more attributes, separated by one or more space or new line characters. Any extra space or new...
Read more >
Doxygen annotation/attribute are ignored - java - Stack Overflow
If you run DoxyWizard you will get a better feel for all of the available options and the effect of each option. DoxyWizard...
Read more >
Sparkline in Google Sheets| Visualize Data in 2 mins - Blog
options – [Optional] – A range or array of optional settings and ... Sparkline: Optional attributes in a column and win-loss chart ...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found