Windows Forms Chart secondary y axis issue

不打扰是莪最后的温柔 提交于 2019-12-24 10:45:27

问题


I have a windows forms application written in c# that has a chart control. The chart shows the tread depth history of a tyre. On the x axis, it has the date, on the the primary y axis, it has the tread depth, and on the secondary y axis it has the mileage of the tyre.

The graph works fine except that the values on the axis lines for the secondary y axis do not show in the correct position. For the primary y axis, there is a number on each line on the left of the chart area, which is correct. For the secondary y axis, I want the values to display on the right of the chart area, but instead, they show on the left, within the chart area. How do I get them to display on the right?

Hopefully this explanation gets across what I'm asking. If the question is not clear, just ask for clarification. As an example, I've done a little diagram below which shows the problem. The Y axis with values of 0, 1, 2, 3 are on the left, outside of the chart area, which is correct. But the secondary axis with values 10, 20, 30 are showing within the chart area on the left instead of on the right.

     3|                |
      | 30             |
     2|                |
      | 20             |
     1|                |
      | 10             |
     0|________________|
           <Dates>

This is what I want:

     3|                |
      |                |30
     2|                |
      |                |20
     1|                |
      |                |10
     0|________________|
           <Dates>

来源:https://stackoverflow.com/questions/20552136/windows-forms-chart-secondary-y-axis-issue

标签
易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!