Empresas
Empregos
  • Sobre nós
  • Soluções
    • Publicação de vagas
      Publique sua vaga e receba candidatos qualificados em 48h.
    • Avaliações de candidatos
      Mais de 500 testes técnicos e psicológicos, mais anti-fraude.
    • Headhunting
      Busca executiva personalizada do início ao fim.
    • Folha de Pagamento + EOR
      Dispersão de folha e EOR em mais de 15 países da LATAM.
  • Preços
  • Empregos

0

232
Visualizações
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
Responde à pergunta
Encontrar trabalhos remotos

Descubra a nova forma de encontrar um emprego!

melhores empregos
Principais categorias de trabalho
Empresas
Postar vaga Preços Comercial
Jurídico
Termos e Condições Política de privacidade
© 2026 PeakU Inc. All Rights Reserved.
Andres GPT
Recomende algumas ofertas para mim
Preciso de ajuda