File tree Expand file tree Collapse file tree 4 files changed +56
-1
lines changed
BlazorApexCharts.Docs.Server/Properties
BlazorApexCharts.Docs/Components/ChartTypes/RadialBarCharts
src/Blazor-ApexCharts/Models Expand file tree Collapse file tree 4 files changed +56
-1
lines changed Original file line number Diff line number Diff line change 3
3
"IIS Express" : {
4
4
"commandName" : " IISExpress" ,
5
5
"launchBrowser" : true ,
6
- "launchUrl" : " features/chart-data " ,
6
+ "launchUrl" : " radialbar-charts " ,
7
7
"environmentVariables" : {
8
8
"ASPNETCORE_ENVIRONMENT" : " Development"
9
9
}
Original file line number Diff line number Diff line change 8
8
</Snippet >
9
9
</CodeSnippet >
10
10
11
+ <CodeSnippet Title =" Total Formatter" ClassName =@typeof(TotalFormatter).ToString() >
12
+ <Snippet >
13
+ <TotalFormatter />
14
+ </Snippet >
15
+ </CodeSnippet >
16
+
11
17
</DocExamples >
Original file line number Diff line number Diff line change
1
+
2
+ <DemoContainer >
3
+ <ApexChart TItem =" Order"
4
+ Title =" Discount"
5
+ Options =" options" >
6
+
7
+ <ApexPointSeries TItem =" Order"
8
+ Items =" orders"
9
+ SeriesType =SeriesType.RadialBar
10
+ Name =" Gross Value"
11
+ XValue =" @(e => e.Country)"
12
+ YAggregate =" @(e => decimal.Round(e.Average(e => e.DiscountPercentage)))"
13
+ OrderByDescending =" e=>e.Y" />
14
+ </ApexChart >
15
+ </DemoContainer >
16
+
17
+
18
+
19
+ @code {
20
+ private List <Order > orders = SampleData .GetOrders ();
21
+ private ApexChartOptions <Order > options = new ();
22
+
23
+ protected override void OnInitialized ()
24
+ {
25
+
26
+ options .PlotOptions = new PlotOptions
27
+ {
28
+ RadialBar = new PlotOptionsRadialBar
29
+ {
30
+ DataLabels = new RadialBarDataLabels
31
+ {
32
+ Total = new RadialBarDataLabelsTotal
33
+ {
34
+ Show = true ,
35
+ Label = " My Total" ,
36
+ FontSize = " 24" ,
37
+ Formatter = @" function (w) {
38
+ return '[' + w.globals.seriesTotals.reduce((a, b) => {
39
+ return a + b
40
+ }, 0) / w.globals.series.length + '%' + ']'
41
+ }"
42
+ }
43
+ }
44
+ }
45
+ };
46
+
47
+ }
48
+ }
Original file line number Diff line number Diff line change @@ -1119,6 +1119,7 @@ public class RadialBarDataLabelsTotal
1119
1119
public object FontWeight { get ; set ; }
1120
1120
public string Label { get ; set ; }
1121
1121
public bool ? Show { get ; set ; }
1122
+ public string Formatter { get ; set ; }
1122
1123
}
1123
1124
1124
1125
public class RadialBarDataLabelsValue
You can’t perform that action at this time.
0 commit comments