手动缩放 wpf 条形图
我正在扫描计算机,它们的比例不能是 1.5,2,2.5,它们应该是整数,如 1,2,3,4。
我当前的代码是,
ICollection<KeyValuePair<String, int>> data = new Dictionary<String, int>();
data.Add(new KeyValuePair<string, int>(Protocol, protocolCount));
mycolseries = new ColumnSeries
{
ItemsSource = data,
Title = Protocol,
IndependentValuePath = "Key",
DependentValuePath = "Value",
};
mainChart.Series.Add(mycolseries);
如果我将依赖值更改为“key”,它会给出奇怪的错误,例如“new 应该与调用或元素一起使用,或者尚未初始化”
I am scanning computers and their scale can not be like 1.5,2,2.5 they should be in whole numbers like 1,2,3,4.
my current code is
ICollection<KeyValuePair<String, int>> data = new Dictionary<String, int>();
data.Add(new KeyValuePair<string, int>(Protocol, protocolCount));
mycolseries = new ColumnSeries
{
ItemsSource = data,
Title = Protocol,
IndependentValuePath = "Key",
DependentValuePath = "Value",
};
mainChart.Series.Add(mycolseries);
if i change dependent value to "key" it gives strange errors like "new should be used with the invocation or element, or has not been initialized"
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
递归调用这个方法
call this method recursivly