v0.6.0-beta.3 - Suggest to Add state to zoom event in ChartCanvas
See original GitHub issueJust wondering as a suggestion to add state to zoom or other events, in the example below, an event is triggered when the last item becomes visible on “panend” event… It would be nice to have this on “zoom” or even better a “zoomend” event… The zoom event currently just provides the mouseXY,currentCharts,currentItem
componentDidMount() {
var {canvas}=this.refs
canvas.subscribe('canvasWidget', (eventType,chartProps,e)=> {
this.eventChange(eventType,chartProps,e)
});
}
/**
* zoom,mousemove,draw,mouseleave,mouseenter,pan,panend
* @param eventType
* @param chartProps
* @param e
*/
eventChange(eventType,chartProps,e)
{
var {lastItemVisible}=this.state
if (!isDefined(chartProps))
return;
switch (eventType){
case 'panend':{
var visibility= (dateAccessor(last(chartProps.plotData)) === dateAccessor(last(this.props.data)))
if (lastItemVisible !== visibility)
{
//signal a change when the last item (most recent) changes visiblity
console.log("lastItemVisible?",visibility)
}
break;
}
}
}
<ChartCanvas
ref="canvas"
ratio={ratio} width={width} height={height} type={type}
margin={margin}
...
Issue Analytics
- State:
- Created 7 years ago
- Comments:6 (5 by maintainers)
Top Results From Across the Web
Geographic availability for Zoom Events - Zoom Support
While access to Zoom Events is generally available worldwide, whether a user can Zoom Events is determined by which country or region the......
Read more >Creating a recurring series event - Zoom Support
Zoom Events allows you to schedule a recurring series event on specific dates and times. Hosts can schedule events with multiple occurrences ...
Read more >Using webhooks - Zoom App Marketplace
This webhook triggers when a user is created on a Zoom account that is subscribed to the User has been created event in...
Read more >Creating a Zoom Event
When you create a single session event (non-recurring), select the event type as Single Session, and add the date and time of the...
Read more >Zoom Webinars Plans & Pricing
Unlimited webinar sessions for up to 30 hours each; Brand your Zoom Webinars with a customized backsplash and control over speaker virtual backgrounds ......
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 FreeTop 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
Top GitHub Comments
this is a little more complex than I though, how about this
https://github.com/rrag/react-stockcharts/blob/42a1695f5649d72ffda6df7fab381fdc8c92d74a/src/lib/ChartCanvas.jsx#L594
Where we add state and fullData as the 3rd argument and move
e
to 4th ?Changed again to go with initial approach of using state as third param and event as 4th