none
How to use MSChart to create a chart that can over Y Axis max value and not auto just Y Axis Max value RRS feed

  • Question

  • Hi all

    I was request to set up Y Axis max value = 100

    and the series value may over 100 a little bit. but they do not want to auto adjust Y Axis over 100

    so that the series will draw outside the chart area. (not label show outside chart area)

    Anyone can help?

    Tuesday, October 8, 2019 9:32 AM

All replies

  • Hi,

    Sorry, but the results you want may not be realized. I tried it, as shown in the figure below, after setting the maximum value of the Y axis to 40, if you add the point (5, 50), only the 40 part will be displayed on the Chart.

    Hope it will be helpful.

    Best Regards,

    Julie


    MSDN Community Support Please remember to click "Mark as Answer" the responses that resolved your issue, and to click "Unmark as Answer" if not. This can be beneficial to other community members reading this thread. If you have any compliments or complaints to MSDN Support, feel free to contact MSDNFSF@microsoft.com.

    Wednesday, October 9, 2019 6:05 AM
    Moderator
  • yes it is my customer wanted. because my users use the current version written by VB6 with some other component that can show series over Y axis max value. (data point value may 101 but Y max = 100, the data point is showed out side the chart)

    But I use .net 2015 with MS chart. I can not do it and the series only can show update to Y axis max value or data point will disappear for the value

    over Y axis max if label style is line.

    Wednesday, October 9, 2019 7:04 AM
  • yes it is my customer wanted. because my users use the current version written by VB6 with some other component that can show series over Y axis max value. (data point value may 101 but Y max = 100, the data point is showed out side the chart)

    But I use .net 2015 with MS chart. I can not do it and the series only can show update to Y axis max value or data point will disappear for the value

    over Y axis max if label style is line.

    Sounds dumb to me?

    Why do this? How far past the max will you go? What if the max is set to 100 and there is a value of 150? What then?

    Show a picture of what you mean.

    There is SCALE BREAK to split the chart axis into two sections for high outliers

    chart1.ChartAreas("Default").AxisY.ScaleBreakStyle.Enabled = True


    Wednesday, October 9, 2019 12:54 PM
  • Dear Sir

    Thank you for your response.

    I check the data, it will not over 100 much, guess at most 100~120....most is between 100~110.

    And it wont often happen. so they want to see the point over 100. 

    Friday, October 18, 2019 10:01 AM
  • Dear Sir

    Thank you for your response.

    I check the data, it will not over 100 much, guess at most 100~120....most is between 100~110.

    And it wont often happen. so they want to see the point over 100. 

    Show a picture of what it should look like.

           


                
    Friday, October 18, 2019 1:55 PM
  • Yes, the chart of "Study Group" is what I need.

    The Y axis max stay at 100. the blue bar of mary is over 100.

    How could you do it by MS Chart?

    Please kindly help to provide the sample code.

    Monday, October 21, 2019 3:06 AM
  • Yes, the chart of "Study Group" is what I need.

    The Y axis max stay at 100. the blue bar of mary is over 100.

    How could you do it by MS Chart?

    Please kindly help to provide the sample code.

    Sorry. As Julie showed I dont see a way to do that with ms chart control basic features.

    It might be possible to draw your own columns or points on top of the other chart features (ie chart areas in study group example blue, white, with chart axes, title, etc) but it might also be possible to just draw your own chart altogether.

    I made the study group example in windows paint just for something to talk about.

    The study group example would be very bad in my opinion and I doubt that is what is really wanted by "them" ??? Perhaps you need to discuss it more.

    The other example I showed is the closest I could create with chart features. You might try drawing a custom (blue) chart area outline around the 100 y values rectangle similar to the study group example using the chart paint event.


    Monday, October 21, 2019 10:29 AM
  • Dear Sir

    I have communicated to users to allow over 100 a little bit. That works. Thanks

    Tuesday, November 5, 2019 3:47 PM