MCPcopy
hub / github.com/apache/echarts / bindAction

Function bindAction

test/homepage3.js:543–573  ·  view source on GitHub ↗
(fromChart, toChart, flag)

Source from the content-addressed store, hash-verified

541 });
542
543 function bindAction(fromChart, toChart, flag) {
544 fromChart.on('updateAxisPointer', function (params) {
545 toChart.dispatchAction(
546 toChart.makeActionFromEvent(params),
547 true
548 );
549 });
550
551 fromChart.on('dataZoom', function (params) {
552 var payload = params.batch ? params.batch[0] : params;
553 toChart.dispatchAction({
554 type: 'dataZoom',
555 dataZoomIndex: 0,
556 start: payload.start,
557 end: payload.end
558 }, true);
559 });
560
561 fromChart.on('brush', function (params) {
562 params.areas[0] && toChart.dispatchAction({
563 type: 'brush',
564 areas: [
565 {
566 xAxisIndex: 0,
567 brushType: 'lineX',
568 coordRange: params.areas[0].coordRange
569 }
570 ]
571 }, true);
572 });
573 }
574}

Callers 1

renderHomepage3DemoFunction · 0.85

Calls 2

dispatchActionMethod · 0.80
makeActionFromEventMethod · 0.80

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…