You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@echarts.apache.org by "echarts-bot[bot] (via GitHub)" <gi...@apache.org> on 2023/05/12 03:15:25 UTC

[GitHub] [echarts] echarts-bot[bot] commented on issue #18615: [Bug] echarts canvas高度已经有但是发现折线图没有撑开

echarts-bot[bot] commented on issue #18615:
URL: https://github.com/apache/echarts/issues/18615#issuecomment-1545050505

   @Julycc41 It seems you are not using English, I've helped translate the content automatically. To make your issue understood by more people and get helped, we'd like to suggest using English next time. 🤗
   <details><summary><b>TRANSLATED</b></summary><br>
   
   **TITLE**
   
   [Bug] The echarts canvas already has a height, but it is found that the line chart is not stretched
   
   **BODY**
   
   ### Version
   
   5.2.2
   
   ### Link to Minimal Reproduction
   
   no response
   
   ### Steps to Reproduce
   
   <img width="616" alt="image" src="https://github.com/apache/echarts/assets/80231740/7f05e752-7a2a-4ebf-8b12-2ef9b5d3aa88">
   
   `
    const myChart2 = echarts.init(document.getElementById('provinceMap'))
       const option = {
         grid: {
           left: 50 // adjust this property
         },
         tooltip: {
           trigger: 'axis',
           axisPointer: {
             type: 'shadow'
           }
         },
         legend: { data: ['sales'] },
         xAxis: {
           type: 'category',
           data: header,
           axisLabel: {
             textStyle: {
               color: '#c3dbff', //Change the axis text color
               fontSize: 11 //Change the axis text size
             }
           }
         },
         // area scaling
         dataZoom: [
           {
             type: 'inside',
             xAxisIndex: 0, // Indicates that this dataZoom component controls the first xAxis
             startValue: 0, // The starting value index of the data window range
             endValue: 3 // the end value index of the data window range
           }
         ],
         yAxis: {
           type: 'value',
           axisLabel: {
             textStyle: {
               color: '#c3dbff', //Change the axis text color
               fontSize: 11 //Change the axis text size
             }
           }
         },
         series: [
           {
             color: '#5087EC',
             itemStyle: { normal: { label: { show: true } } },
             name: 'Sales (head)',
             data: salesList,
             type: 'line'
           }
         ]
       }
       myChart2. setOption(option)
   `
   
   ### Current Behavior
   
   I am using the elastic layout, set the percentage and follow the height of the parent level to expand
   
   ### Expected Behavior
   
   The line chart can be stretched
   
   ### Environment
   
   ```markdown
   - OS:
   -Browser:
   - Framework:
   ```
   
   
   ### Any additional comments?
   
   _No response_
   </details>


-- 
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