public void Window1(){
setChartSCale()
}
private void setChartScale()
{
lamainChart.Interval = 1;
lamainChart.Orientation = AxisOrientation.Y;
lamainChart.ShowGridLines = true;
//lamainChart.Maximum = 50;
lamainChart.Minimum = 0;
}
递归调用此方法
private void addrecursiveledgendafterinit(字符串协议,int protocolCount)
{
ICollection>data=new dictionary();
data.add(new keyvaluepair(protocol,protocolCount));
mycolseries = new ColumnSeries
{
ItemsSource = data,
Title = Protocol,
IndependentValuePath = "Key",
DependentRangeAxis =lamainChart,
DependentValuePath = "Value"
};
mainChart.Series.Add(mycolseries);
}