mirror of
https://github.com/XCharts-Team/XCharts.git
synced 2026-05-18 14:30:10 +00:00
28 lines
895 B
C#
28 lines
895 B
C#
|
|
namespace XCharts.Runtime
|
|
{
|
|
[System.Serializable]
|
|
[SerieConvert(typeof(Line), typeof(Bar))]
|
|
[SerieHandler(typeof(PieHandler), true)]
|
|
[DefaultAnimation(AnimationType.Clockwise)]
|
|
[SerieExtraComponent(typeof(LabelStyle), typeof(LabelLine), typeof(Emphasis))]
|
|
public class Pie : Serie
|
|
{
|
|
public override bool useDataNameForColor { get { return true; } }
|
|
|
|
public static Serie AddDefaultSerie(BaseChart chart, string serieName)
|
|
{
|
|
var serie = chart.AddSerie<Pie>(serieName);
|
|
chart.AddData(serie.index, 70, "pie1");
|
|
chart.AddData(serie.index, 20, "pie2");
|
|
chart.AddData(serie.index, 10, "pie3");
|
|
return serie;
|
|
}
|
|
|
|
public static Pie CovertSerie(Serie serie)
|
|
{
|
|
var newSerie = SerieHelper.CloneSerie<Pie>(serie);
|
|
return newSerie;
|
|
}
|
|
}
|
|
} |