Unable to use legend_toggle
See original GitHub issueLegend toggle gives me the following error when I toggle it.
Example code in next.js
import { Chart } from 'react-google-charts'
export default () => (
<Chart
chartType="ScatterChart"
data={[['Age', 'Weight'], [8, 12], [4, 5.5]]}
options={{}}
graph_id="ScatterChart1"
width="100%"
height="400px"
legend_toggle
/>
)
Issue Analytics
- State:
- Created 5 years ago
- Comments:5 (1 by maintainers)
Top Results From Across the Web
Can't choose legend on Switch : r/apexlegends - Reddit
Can't choose legend on Switch. It stays on the location loading screen throughout the character selection and I can't choose anyone but the ......
Read more >TimeSeries: allow toggling of Legends like w/ Graph (old)
On the old Graph panel we used to be able to toggle panel legends on or off using the panel popup menu ("More..."...
Read more >Legend issue - Group Layer Name and Headings toggl...
I'm unable to turn off group layer names and headings in my legend. ... Legend issue - Group Layer Name and Headings toggle...
Read more >How can I use a legend in App Designer to toggle line visibility ...
In GUIDE or with 'figure', I can use the 'ItemHitFcn' callback of a 'legend' to toggle the visibility of a line on and...
Read more >d3 error in legend toggling -- Uncaught DOMException
Error: "Uncaught DOMException: Failed to execute 'querySelector' on 'Document': '#line_General Motors Truck Company (GMC)' is not a valid ...
Read more >
Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free
Top Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Hey !
Thanks for reporting the issue.
This should be fixed in latest version (>=2.0).
Feel free to re-open if it re-appears.
I changed this line
From:
To:
That made it work as expected for me. Did not test it with custom colors though
Deployed to npm as @alheimsins/react-google-charts - repo maccyber/react-google-charts