You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@echarts.apache.org by "MariiieP (via GitHub)" <gi...@apache.org> on 2024/08/01 11:52:41 UTC

[I] [Bug] Zoom (Panning) outside last data in series [echarts]

MariiieP opened a new issue, #20219:
URL: https://github.com/apache/echarts/issues/20219

   ### Version
   
   5.5.1
   
   ### Link to Minimal Reproduction
   
   https://jsfiddle.net/BlackLabel/uab5mw0d/
   
   ### Steps to Reproduce
   
   I want to shift the data on the axis beyond the date. After the shift, redraw the data on the graph. See ER.
   
   I tried to do this using the current capabilities and attaching the configuration below.
   If you set a large percentage, it starts to work in a similar way. But it is unrealistic to select a percentage for the gap between the data every time
   Also, this solution allows you to shift the axis only in one direction, and not in two at once.
   
   Example:
   ```
   option = {
     xAxis: {
           type: 'time',
           splitNumber: 5,
       },
     dataZoom: {
       **start: 99.9992**, 
       type: "inside",
       moveOnMouseMove: "ctrl",
     // rangeMode: [1570627800000, 50]
     },
       yAxis: {
           type: 'value',
            splitNumber: 3,
            min: 0,
            max: 5,
            alignWithLabel: true
       },
       series: [
         {
           data: [[1721906700000, 0], [1721906400000, 1], [1721906100000, 2], [1721905800000, 0], [1721905500000, 1]],
           type: 'line',
           **zoom: 0.15,**
         },
         {
           type: 'scatter',
           data: [
             [1570627800000, 2]
           ]
         }
       ]
   }
   ```
   
   
   
   ### Current Behavior
   
   I can't achieve this behavior at the moment. rangeMode allows you to change the axis only inside the current segment 0-100. 
   Behavior with the configuration above: ![2](https://github.com/user-attachments/assets/0082ea7f-79bd-4dcb-9553-62a770b22727)
   
   
   ### Expected Behavior
   
   ER:
   
   
   The highcharts library allows you to do this: ![1](https://github.com/user-attachments/assets/4a6730c8-8b04-49e2-87ea-76a5aed1692d)
   
   simplified example: https://jsfiddle.net/BlackLabel/uab5mw0d/
   
   
   ### Environment
   
   ```markdown
   - OS: windows
   - Browser: Chrome 126.0.6478.185
   - Framework: React 18
   ```
   
   
   ### Any additional comments?
   
   Is it possible to achieve ER with current capabilities?


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


Re: [I] [Bug] Zoom (Panning) outside last data in series [echarts]

Posted by "helgasoft (via GitHub)" <gi...@apache.org>.
helgasoft commented on issue #20219:
URL: https://github.com/apache/echarts/issues/20219#issuecomment-2267096505

   Detailed explanation helps.  It's about using the _dataZoom_ as data selector. Not easy but feasible - [link](https://helgasoft.github.io/echarty/extras.html#zpan).
   
   BTW, the Highcharts code example uses _xAxis.max_, same as ECharts 😉
   


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


Re: [I] [Bug] Zoom (Panning) outside last data in series [echarts]

Posted by "MariiieP (via GitHub)" <gi...@apache.org>.
MariiieP commented on issue #20219:
URL: https://github.com/apache/echarts/issues/20219#issuecomment-2264657673

   I already wrote above, min / max does not work, as does start, rangeMode. The data needs to be requested AFTER scrolling the axis, pls look at the ER carefully


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


Re: [I] [Bug] Zoom (Panning) outside last data in series [echarts]

Posted by "AshwinTayson (via GitHub)" <gi...@apache.org>.
AshwinTayson commented on issue #20219:
URL: https://github.com/apache/echarts/issues/20219#issuecomment-2613082950

   Im also looking into similar functionality where panning beyound current data is necessary but the api is very restrictive since data zoom shrinks the chart if the max value is increased. Axis panning is kinda important in financial charts


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


Re: [I] [Bug] Zoom (Panning) outside last data in series [echarts]

Posted by "helgasoft (via GitHub)" <gi...@apache.org>.
helgasoft commented on issue #20219:
URL: https://github.com/apache/echarts/issues/20219#issuecomment-2263573951

   Panning can be achieved with [xAxis.min](https://echarts.apache.org/en/option.html#xAxis.min) and [xAxis.max](https://echarts.apache.org/en/option.html#xAxis.max) - [Demo](https://echarts.apache.org/examples/en/editor.html?c=line-simple&code=HYUw7gIghgLlAEBeeBtAjAdgExoJwAYBWfE0gGniwF0BuAKAHsAHGASweCXgG8754AHgEEBrAM4AuHn37wYATyYgpAcjYBbECrIz-YpgBtWMAHIBXdQCMQAJymEZAXx395I8VN6y5i5fBUAblAGZlousvpGphbWdvAAzOH86qzAUvhJ8OpQAvaZwawA5sAA6sYAFgAyUNYGUjA2oU7hACawUABaDAzqnj5KqqlirC1a_M4yYrasIJKoutLe_G1wUigL3ujYePgAbBikJBT4VJmbmDgEuwAshxnwaKcbsluXe2h3FNRnLxc7hAAOT7wE4_fivf7EQ4UR7PJ5Lfp-FRGUAqBaOGRUOiOehTGAAFVYmgYZhgAAoyQBKJAAPi8WXkAGFylAbDAAHR4gDyLHYwDJ3EE7kk3BSaXgoEg7RQJ0c8EclJo8AA9Mr4EwoMBJiACUSQCTyVTafTkkyWWz2VAmEpgC1oHABVMbDMxABJW0gXL3FZQNaS-1QKgK-jjMhocNoRXYshYUiUoA)
   
   this issue is not a Bug or a Feature, but a "how-to" question
   🚩 Please follow **Official posting guidelines** (below).
   This is not a good place to ask questions about usage, "how to" or extensive debugging assistance. 
   
   ---
   The issue list is reserved exclusively for bug reports and feature requests.
   For usage questions, please use the following resources:
   
   * Read the [docs](https://echarts.apache.org/option.html)
   * Find in [examples](https://echarts.apache.org/examples/)
   * Look for / ask questions on [Stack Overflow](https://stackoverflow.com/questions/tagged/echarts)
   ---
   
   Another good resource is website [makeapie.cn](https://www.makeapie.cn/) with many **code examples**.


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


Re: [I] [Bug] Zoom (Panning) outside last data in series [echarts]

Posted by "14lywa44 (via GitHub)" <gi...@apache.org>.
14lywa44 commented on issue #20219:
URL: https://github.com/apache/echarts/issues/20219#issuecomment-2691295454

   The easiest way to fix your issue is to add a new point into the series data where the time value is set to the desired end date and the value is set to null.
   
   ```javascript
   const END_DATE = 000000000; // some number
   
   series: [
         {
           data: [[1721906700000, 0], [1721906400000, 1], [1721906100000, 2], [1721905800000, 0], [1721905500000, 1], [END_DATE, null]],
           type: 'line',
           zoom: 0.15, // !!!
         }
       ]```


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