开发者

Setting the Axis origin in the MSChart control

开发者 https://www.devze.com 2023-01-04 11:12 出处:网络
I\'m putting together a graph with the MSChart con开发者_如何学Gotrol for VB6.Is there a way to adjust the location of the points on the X axis so that the first data point in the series sits against

I'm putting together a graph with the MSChart con开发者_如何学Gotrol for VB6. Is there a way to adjust the location of the points on the X axis so that the first data point in the series sits against the Y axis? By default it floats in a space between the origin and the first gridline.


I hate to see questions left unanswered, so here's my solution to the problem at the time.

If you use a large number of data points in the grid, the first point still won't really sit next to hte Y axis; however, if the graph is scaled correctly, it does look like it, and you won't be able to tell the difference. Turns out the problem is only visible with a small number of data points in the series.


Try Setting :

chartArea.AxisX.IsMarginVisible = false;
0

精彩评论

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

关注公众号