-
Notifications
You must be signed in to change notification settings - Fork 11
/
Copy pathSimplePieChart.razor
52 lines (48 loc) · 1.07 KB
/
SimplePieChart.razor
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
@using Vizor.ECharts;
<Vizor.ECharts.EChart Options="@options" Width="800px" Height="400px" />
@code {
// see https://echarts.apache.org/examples/en/editor.html?c=pie-simple
private ChartOptions options = new()
{
Title = new()
{
Text = "Referer of a Website",
Subtext = "Fake Data",
Left = "center"
},
Tooltip = new()
{
Trigger = ECharts.TooltipTrigger.Item
},
Legend = new()
{
Orient = Orient.Vertical,
Left = "left"
},
Series = new()
{
new PieSeries()
{
Name = "Access From",
Radius = new CircleRadius("50%"),
Data = new List<PieSeriesData>()
{
new() { Value = 1048, Name = "Search Engine" },
new() { Value = 735, Name = "Direct" },
new() { Value = 580, Name = "Email" },
new() { Value = 484, Name = "Union Ads" },
new() { Value = 300, Name = "Video Ads" },
},
Emphasis = new()
{
ItemStyle = new()
{
ShadowBlur = 10,
ShadowOffsetX = 0,
ShadowColor = Color.FromRGBA(0, 0, 0, 0.5)
}
}
}
}
};
}