本文介绍了访问选定的行,在radGridView上按下向上或向下键(在C#中)的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

用户如何在运行模式下更改Telerik组件的ChartSeries的颜色和类型?

您好

我将所有类型的ChartSeriesType放在一个组合框中。用户如何改变它的类型(Bar,Line,...)?

Bellow line有错误:

chartSerie1.Type = Telerik.Charting.ChartSeriesType +。 + my_ChartSeriesType.SelectedValue.ToString();



如何更改每个系列的颜色?



谢谢非常

How user can change color and type of ChartSeries of Telerik component in Run mode ?
Hi
I put all types of ChartSeriesType in a combobox. How user can change it’s type(Bar, Line, …)?
Bellow line has error:
chartSerie1.Type = Telerik.Charting.ChartSeriesType + "." + my_ChartSeriesType.SelectedValue.ToString();

how can change color of every series?

Thanks very much

推荐答案

SeriesMapping seriesMapping = new SeriesMapping();
seriesMapping.LegendLabel = "Product Sales";
seriesMapping.SeriesDefinition = new SplineSeriesDefinition();   // The expected type (SplineSeriesDefinition, BarSeriesDefinition, ...) you have to do a switch-case/if clause to differentiate or you use reflection to create the type dynamically
seriesMapping.ItemMappings.Add( new ItemMapping( "Month", DataPointMember.XValue ) );
seriesMapping.ItemMappings.Add( new ItemMapping("Quantity", DataPointMember.YValue));
radChart.SeriesMappings.Add( seriesMapping );





2.如何设置图表系列样式


这篇关于访问选定的行,在radGridView上按下向上或向下键(在C#中)的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!

11-02 14:09