Skip to content

Commit de08d56

Browse files
committed
fix for #6 use the first chart as main chart if no EventCapture is defined
1 parent 46be632 commit de08d56

File tree

1 file changed

+1
-0
lines changed

1 file changed

+1
-0
lines changed

src/lib/utils/ChartDataUtil.js

+1
Original file line numberDiff line numberDiff line change
@@ -52,6 +52,7 @@ var ChartDataUtil = {
5252
var eventCapture = this.getChildren(children, /EventCapture$/);
5353
if (eventCapture.length > 1) throw new Error("only one EventCapture allowed");
5454
if (eventCapture.length > 0) return eventCapture[0].props.mainChart;
55+
if (eventCapture.length === 0) return this.getChildren(children, /Chart$/)[0].props.id;
5556
},
5657
getClosestItem(plotData, mouseXY, chartData) {
5758
// console.log(chartData);

0 commit comments

Comments
 (0)