开发者

winforms chart, change values on x axis

开发者 https://www.devze.com 2023-02-25 08:39 出处:网络
I have added values on x axis between 0-255. I add the values to a serie 开发者_C百科with serie.addXY(127,10000); When the chart is displayed, the values it shows on the x axis are -1, 49, 99...

I have added values on x axis between 0-255. I add the values to a serie 开发者_C百科with serie.addXY(127,10000); When the chart is displayed, the values it shows on the x axis are -1, 49, 99...

How can I change this to display 0, 50,100?


Try setting axis bounds. You can do that in the designer or via code:

        Chart1.ChartAreas["Default"].AxisX.Minimum = 0;
        Chart1.ChartAreas["Default"].AxisX.Maximum = 255;
0

精彩评论

暂无评论...
验证码 换一张
取 消