Business
Jobs
  • About Us
  • Solutions
    • Job Postings
      Post your job and receive qualified candidates in 48h.
    • Candidate Assessments
      500+ technical and psychological tests, plus anti-fraud.
    • Headhunting
      Tailor-made executive search from start to finish.
    • Payroll + EOR
      Payroll dispersal and EOR across 15+ LATAM countries.
  • Pricing
  • Jobs

0

229
Views
How to show/design the data description in ECharts?

I have the sample code:

<!DOCTYPE html>
<html>
<head>
    <meta charset="utf-8">
    <title>ECharts</title>
    
    <script src="https://cdn.staticfile.org/echarts/5.2.2/echarts.min.js"></script>
</head>



<body>
    
    <div id="main" style="width: 600px;height:400px;"></div>
    
    <script type="text/javascript">
      
        var myChart = echarts.init(document.getElementById('main'));
        
        var option = {
            title: {
                text: 'ECharts',
                textStyle: {
                    fontSize: 30,
                    color: 'red'
                }
            },
            tooltip: {
                trigger:'axis'
            },
            toolbox:{},
            legend: {
                data:['sale']
            },
            xAxis: {
                data: ["A","B","C","Pants","Shoes","Shirt"]
            },
            yAxis: {},
            series: [{
                name: 'sales',
                type: 'line',
                data: [5, 20, 36, 10, 10, 20],
                markPoint: {
                    data: [{ type: 'max', name: 'Max' },{ type: 'min', name: 'Min' }]},
                }]
        };
   
        myChart.setOption(option);
    </script>
</body>

</html>

I want to design the result: When the mouse clicks or the mouse passes over this data point, it can display the data description defined by myself. for example, if the mouse pass over the data points 'shoes', the charts will show a Dialog box with content 'This is shoes data, the sales of shoes is 10' enter image description here

Thanks so much if anyone can give me some hints! Really thx for any suggestions

about 4 years ago · Juan Pablo Isaza
Answer question
Find remote jobs

Discover the new way to find a job!

Top jobs
Top job categories
Business
Post vacancy Pricing Sales
Legal
Terms and conditions Privacy policy
© 2026 PeakU Inc. All Rights Reserved.
Andres GPT
Show me some job opportunities
There's an error!