You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Argument of type
'{ removeAction: (actionID: string) => void;
getSelection: () => { row?: any; column?: any; }[];
setAction: (ChartAction: GoogleChartAction) => void;
getImageURI: () => void; clearChart: () => void; }'
is not assignable to parameter of type 'GoogleChartWrapper | GoogleChartControl | GoogleChartEditor'.
Which I can see why but I don't get how this isn't an issue for other people.
In essence, the issue is that the getChart() returns this. I don't see how this can be used to create a listener for other properties like onmouseover, click etc as the examples on other issues here - nor I see how GoogleVizEventName works for click.
I can change the type of chart to be any but then click is not a valid one - it seems the addListener is matching to this and not the addListener under google namespace.
Would you like to work on a fix?
Current and expected behavior
Having looked at previous examples like #263 - I have tried the below code :
I am getting an error :
Which I can see why but I don't get how this isn't an issue for other people.
In essence, the issue is that the
getChart()
returns this. I don't see how this can be used to create a listener for other properties likeonmouseover, click
etc as the examples on other issues here - nor I see how GoogleVizEventName works forclick
.I can change the type of chart to be
any
but thenclick
is not a valid one - it seems theaddListener
is matching to this and not the addListener under google namespace.Reproduction
https://codesandbox.io/s/weathered-fast-hrkby?file=/App.tsx
react-google-charts version
v4.0.0
Possible solution
No response
The text was updated successfully, but these errors were encountered: