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 2021/08/09 16:01:18 UTC

[GitHub] [echarts] aweibell opened a new issue #15498: Distribute axes evenly

aweibell opened a new issue #15498:
URL: https://github.com/apache/echarts/issues/15498


   ### What problem does this feature solve?
   When positioning a yAxis, one can set position left/right and offse (in pixels?). If none of these are set, and multiple axes added, the axes should be evenly distributed along the xAxis of the chart. It may be preferable to let `position` get two new options: `'inside'`, which distributes axes inside the chart, or `'outside'`, which distributes outside the plot area, ensuring that names and labels don't interfere with each other.
   
   An alternative solution, of lower value, but still better than the existing options, could be to allow the use of percentage values in `offset` instead of pixels.
   
   ### What does the proposed API look like?
   ```
   yAxis: [
     {
       position: 'inside',
       axisLine: { show: false }
       ...
     },
   series: [{ yAxisIndex: 0, ... }]
   ]
   ```
   
   <!-- This issue is generated by echarts-issue-helper. DO NOT REMOVE -->
   <!-- This issue is in English. DO NOT REMOVE -->


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


[GitHub] [echarts] Ovilia commented on issue #15498: Distribute axes evenly

Posted by GitBox <gi...@apache.org>.
Ovilia commented on issue #15498:
URL: https://github.com/apache/echarts/issues/15498#issuecomment-895686704


   Sorry I didn't understand why do you need to do that. More commonly, you set the data with x and y values for each data and each series with the same x value will have the same position.


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


[GitHub] [echarts] Ovilia commented on issue #15498: Distribute axes evenly

Posted by GitBox <gi...@apache.org>.
Ovilia commented on issue #15498:
URL: https://github.com/apache/echarts/issues/15498#issuecomment-895925083


   You need multiple `grid`, `xAxis` and `yAxis` and make sure that all `grid`s are in the same position. 
   Take [this example](https://echarts.apache.org/examples/en/editor.html?c=line-gradient) as a start and change the position of the second grid to be the same as the first one.


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


[GitHub] [echarts] Ovilia commented on issue #15498: Distribute axes evenly

Posted by GitBox <gi...@apache.org>.
Ovilia commented on issue #15498:
URL: https://github.com/apache/echarts/issues/15498#issuecomment-899196499


   I'm not sure what does the x value in your chart mean but it looks somehow hard to understand what the chart means.
   Not sure if your are looking for this: https://echarts.apache.org/examples/zh/editor.html?c=parallel-aqi


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


[GitHub] [echarts] Ovilia commented on issue #15498: Distribute axes evenly

Posted by GitBox <gi...@apache.org>.
Ovilia commented on issue #15498:
URL: https://github.com/apache/echarts/issues/15498#issuecomment-898223278


   @aweibell Hi, I made this demo for your. https://jsfiddle.net/ovilia/8o7n41e5/4/
   See if this helps.


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


[GitHub] [echarts] echarts-bot[bot] commented on issue #15498: Distribute axes evenly

Posted by GitBox <gi...@apache.org>.
echarts-bot[bot] commented on issue #15498:
URL: https://github.com/apache/echarts/issues/15498#issuecomment-895343709


   Hi! We've received your issue and please be patient to get responded. 🎉
   The average response time is expected to be within one day for weekdays.
   
   In the meanwhile, please make sure that it contains **a minimum reproducible demo** and necessary **images** to illustrate. Otherwise, our committers will ask you to do so.
   
   *A minimum reproducible demo* should contain as little data and components as possible but can still illustrate your problem. This is the best way for us to reproduce it and solve the problem faster.
   
   You may also check out the [API](http://echarts.apache.org/api.html) and [chart option](http://echarts.apache.org/option.html) to get the answer.
   
   If you don't get helped for a long time (over a week) or have an urgent question to ask, you may also send an email to dev@echarts.apache.org. Please attach the issue link if it's a technical question.
   
   If you are interested in the project, you may also subscribe our [mailing list](https://echarts.apache.org/en/maillist.html).
   
   Have a nice day! 🍵


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


[GitHub] [echarts] aweibell commented on issue #15498: Distribute axes evenly

Posted by GitBox <gi...@apache.org>.
aweibell commented on issue #15498:
URL: https://github.com/apache/echarts/issues/15498#issuecomment-898512930


   I appreciate your efforts, @Ovilia, but I don't see how the demo addresses my request?
   
   What I want is multiple Y-axis with axisLabels distributed evenly, or at least so that the numbers are readable and not conflicting with each other. I want them to be inside the plot area in the X-direction, but the min/max numbers to be outside the plot area in the Y-direction.
   
   My first screenshot was a hack where I used `yAxis.name` to show the values that I calculated from the data set (for the yAxis.min/max props). However, I was not able to spread them evenly across the plot area, since the only option is the `offset` value in pixels.
   
   Ideally I would prefer to use the yAxis.axisLabel values, with a setting that could position them outside the plot area to not interfere with the series line. Maybe that should be a separate feature request?
   
   I have modified my sandbox example. It kind of works for a _wide_ chart, but having **pixels** as the only option does not make it easy to spread the axis evenly and avoid collision, e.g. when the plot is _narrow_. See attached images.
   ![echarts_yaxis_offset_40px_wide](https://user-images.githubusercontent.com/3035359/129359322-77e13e25-43ac-437f-b4ab-04d6eef5dd0d.png)
   
   ![echarts_yaxis_offset_40px_narrow](https://user-images.githubusercontent.com/3035359/129359370-c07cc42d-6487-43a2-be39-d71f931d5680.png)


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


[GitHub] [echarts] aweibell commented on issue #15498: Distribute axes evenly

Posted by GitBox <gi...@apache.org>.
aweibell commented on issue #15498:
URL: https://github.com/apache/echarts/issues/15498#issuecomment-910255128


   Any additional thoughts on this, @Ovilia ?


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


[GitHub] [echarts] aweibell commented on issue #15498: Distribute axes evenly

Posted by GitBox <gi...@apache.org>.
aweibell commented on issue #15498:
URL: https://github.com/apache/echarts/issues/15498#issuecomment-895826225


   The situation where I need this is when multiple series have different value ranges and my users want a separate Y axis for each series to utilize the full chart height. I want to indicate the min/max range of each series, without wasting a lot of space outside the plot area (limiting the available space for the actual plot). If putting the axis labels outside the plot area, it is also difficult to achieve high utilization of the space as the positioning is fixed by offset in pixels, and not dynamic according to the size of the actual label content.
   
   I also find the possibilities for controlling the axis labels to be limited. They appear ON the min and max lines, while I would prefer to have them below and above, respectively, i.e. outside the plot area. Even if I set `splitNumber: 1` there sometimes appear a value in the middle. That is why I tried to put them in the axis name, as a workaround/hack.
   
   ![2021-08-10-090440_area_grim](https://user-images.githubusercontent.com/3035359/128831536-d5940dbf-6077-4649-af47-281873f8a5c1.png)
   
   Was this clarifying? Please let me know if I can do anything more to explain the problem.


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


[GitHub] [echarts] aweibell commented on issue #15498: Distribute axes evenly

Posted by GitBox <gi...@apache.org>.
aweibell commented on issue #15498:
URL: https://github.com/apache/echarts/issues/15498#issuecomment-899384040


   Sorry for not being specific, I thought my data set in the sandbox was showing that my X values are timestamps. My data are timeseries. From what I read in the documentation, parallell is meant for data that are _not_ timeseries?
   
   Apart from that, the automatically spread out multiple Y axis feature of the parallell plot is exactly what I am looking for, just for a series plot!
   
   I would also prefer if `splitNumber: 1` was forcing the graph to display only min/max values. Now you can't tell for sure if there will appear a value in the middle or not.


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


[GitHub] [echarts] aweibell commented on issue #15498: Distribute axes evenly

Posted by GitBox <gi...@apache.org>.
aweibell commented on issue #15498:
URL: https://github.com/apache/echarts/issues/15498#issuecomment-896374685


   Thank you for reaching out, but I really don't understand how multiple grids will help. I am not very familiar with grids, but all my testing so far has been unsuccessful.
   1) How can multiple grids provide automatic placement for multiple y axes without collisions?
   2) When adding one yAxis and one xAxis per series, and one grid per yAxis, everything is put on top of each other, just as with one grid? Please see my codesandbox 
   https://codesandbox.io/s/react-echarts-multiple-y-axes-3efrb?file=/src/plotConfig.js
   Add series by clicking the button. Option object below.


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