微软图表 - 图表缩小了更多系列! [英] Microsoft Charting - chart shrinks with more series!

查看:72
本文介绍了微软图表 - 图表缩小了更多系列!的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我有一个可变数量的系列图表,可由用户确定。如果使用少量系列,则图表和图例会正确显示(图例下方的图例) - 如果我使用更多的系列,那么图表会变得越来越小,直到它几乎消失并且剩下的全部为止是x轴线,它出现在区域的顶部,而传说在底部,两者之间没有任何内容。



撇开图表结束的事实无论如何,三十个系列看起来有点棘手,这里有一些截图来证明这个问题:



十大系列图表: http://i62.tinypic.com/dr5n6h.jpg [ ^ ]

包含16个系列的图表: http: //i59.tinypic.com/2i9qyp1.jpg [ ^ ]

图表有三十六秒eries: http://i58.tinypic.com/103blhv.jpg [ ^ ]

I have a chart with a variable number of series which can be determined by the user. If a small number of series are used then the chart and legends appear correctly (legends are underneath the chart) - if I use a larger number of series then the chart gets smaller and smaller until the point when it virtually disappears and all that is left is the x axis line which appears at the top of the area, and the legend at the bottom with nothing in between.

Putting aside the fact that a chart with over thirty series would be a bit tricky to view anyway, here's some screenshots to demonstrate the issue:

Chart with ten series: http://i62.tinypic.com/dr5n6h.jpg[^]
Chart with sixteen series: http://i59.tinypic.com/2i9qyp1.jpg[^]
Chart with thirty six series: http://i58.tinypic.com/103blhv.jpg[^]

推荐答案

解决方案: https://social.msdn.microsoft.com/Forums/vstudio/en-US/7a108b04-11d1-4d7a-843a-eaa5d0b97396/how-to -remove-space-bettween-area-area-and-the-start-of-the-picture-picture?forum = MSWinWebChart [ ^ ]



引用:在Winforms世界中,我碰巧明确地说设置位置X / Y /宽度/高度我的传奇和图表区域本身的值是这样的:



myChart.ChartAreas [0] .Position.Autio = false;

myChart.ChartAreas [0] .Position.X = 20;

myChart.ChartAreas [0] .Position.Y = 0;

myChart.ChartAreas [0] .Position.Width = 80;

myChart.ChartAreas [0] .Position.Height = 100;

myChart.Legends [0] .Position.Auto = false;

myChart.Legends [0] .Position.X = 0;

myChart.Legends [0] .Position.Y = 0;

myChart .Legends [0] .Position.Width = 20;

myChart.Legends [0] .Position.Height = 100;



和然后我的传奇水平占据了20%的空间。
Solution here: https://social.msdn.microsoft.com/Forums/vstudio/en-US/7a108b04-11d1-4d7a-843a-eaa5d0b97396/how-to-remove-space-bettween-chart-area-and-the-start-point-of-the-chart-picture?forum=MSWinWebChart[^]

Quote: "In the Winforms world, I happen to explicitly set the Position X/Y/Width/Height values for my legend and the chart area itself by doing something like so:

myChart.ChartAreas[0].Position.Autio = false;
myChart.ChartAreas[0].Position.X = 20;
myChart.ChartAreas[0].Position.Y = 0;
myChart.ChartAreas[0].Position.Width = 80;
myChart.ChartAreas[0].Position.Height = 100;
myChart.Legends[0].Position.Auto = false;
myChart.Legends[0].Position.X = 0;
myChart.Legends[0].Position.Y = 0;
myChart.Legends[0].Position.Width = 20;
myChart.Legends[0].Position.Height = 100;

and then my legend takes up 20% of the space horizontally."


这篇关于微软图表 - 图表缩小了更多系列!的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆