Skip to content

xhanb/ECharts.Net

Repository files navigation

ECharts.Net

Nuget Build status GitHub release Nuget GitHub

Tips

Based on Echarts2.0

How to use?

该类库包含Echarts2.0版本的所有基本类型,操作类ChartOpertation提供以下图表的静态方法,未列出的可以自己实现或者创建分支一起完善。

饼状图:ChartPieDataProcess

线性图:ChartLineDataProcess

时间轴线性图:TimeLineChartLineDataProcess

柱状图:ChartBarDataProcess

折柱混搭:ChartBarAndLineDataProcess

条形图:ChartTiaoBarDataProcess

多维条形图:ChartDuoWeiTiaoBarDataProcess

Demo

ChartPieSeries cps = new ChartPieSeries();
cps.name = "pie demo";
cps.radius = 90;
cps.startAngle = 300;
cps.type = "pie"; 

ChartSeriesData csd_pc = new ChartSeriesData();
csd_pc.name = "电脑";
csd_pc.value = "23";

ChartSeriesData csd_phone = new ChartSeriesData();
csd_phone.name = "手机";
csd_phone.value = "88";

List<object> data = new List<object>();
data.Add(csd_pc);
data.Add(csd_phone);

cps.data = data; 

List<string> legend = new List<string>(4);
legend.Add("电脑");
legend.Add("手机"); 

List<ChartPieSeries> cpss = new List<ChartPieSeries>();
cpss.Add(cps); 

string str = ChartOpertation.ChartPieDataProcess(cpss, legend, true, "pie demo", "subtext", true);

About

Based on ECharts(https://echarts.baidu.com/echarts2/doc/doc.html) tool library,support.NET Framework and.NET Core

Resources

License

Stars

Watchers

Forks

Packages

No packages published

Languages