控制图表中列栏的宽度c# [英] Control the width of the column bar in a chart c#

查看:48
本文介绍了控制图表中列栏的宽度c#的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我使用 MS 图表来显示一些信息,当用户单击一个条形时,我必须显示不同的图表.所有这些都完全正常.但宽度完全不受我控制.看起来真的很奇怪.我尝试使用以下方法调整它:

I am using a MS chart for displaying some information and i have to show different charts when the user clicks a bar. All that works totally fine. but the width is totally out of my control. It looks really weird. I tried to adjust it using :

 series["PointWidth"] = pointWidth.ToString();

但是如果条形图彼此远离.它们急剧扩大,使其看起来非常糟糕.有没有办法可以为所有条形提供恒定宽度?

But if the bars are placed far from each other. They widen drastically making it look very worse. Is there a way i can provide a constant width for all the bars?

以及如何计算 x 轴平面的宽度.由于宽度应该根据条形数量动态变化.我必须计算它...任何帮助????

And also how can i calculate the width of the x axis plane. Since the Width should be dynamic as per the number of bar. I would have to calculate it...any help ????

推荐答案

Chart1.Series[0]("PixelPointWidth") = 2

这篇关于控制图表中列栏的宽度c#的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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