You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@echarts.apache.org by GitBox <gi...@apache.org> on 2022/11/02 06:37:47 UTC

[GitHub] [echarts] MainHou commented on a diff in pull request #17849: feat(dataView): add dataViewOpend and dataViewClosed event, close #17840

MainHou commented on code in PR #17849:
URL: https://github.com/apache/echarts/pull/17849#discussion_r1011246699


##########
test/dataview-event.html:
##########
@@ -0,0 +1,63 @@
+<!DOCTYPE html>
+
+<html>
+
+<head>
+    <meta charset="utf-8" />
+    <meta name="viewport" content="width=device-width, initial-scale=1" />
+    <link rel="stylesheet" href="lib/reset.css" />
+    <style>
+        #main {
+            width: 1200px;
+        }
+    </style>
+</head>
+
+<body>
+    <div id="main"></div>
+
+    <!-- please run npm run build/watch -->
+    <script src="../dist/echarts.js"></script>
+    <script>
+        const chart = echarts.init(document.getElementById("main"));
+
+        var option = {
+            toolbox: {
+                feature: {
+                    dataView: {
+                        show: true
+                    }
+                }
+            },
+            xAxis: {
+                type: 'category',
+                data: ['Mon', 'Tue', 'Wed', 'Thu', 'Fri', 'Sat', 'Sun']
+            },
+            yAxis: {
+                type: 'value'
+            },
+            series: [
+                {
+                    data: [150, 230, 224, 218, 135, 147, 260],
+                    type: 'line'
+                }
+            ]
+        };
+
+        chart.on('dataViewChanged', function (params) {

Review Comment:
   I have made changes to the code, please review it again.  It will rebase after confirmation 



-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: commits-unsubscribe@echarts.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@echarts.apache.org
For additional commands, e-mail: commits-help@echarts.apache.org