|
| 1 | +@page |
| 2 | +@model IndexModel |
| 3 | +@{ |
| 4 | + List<LayoutData> SalesData = new List<LayoutData>() |
| 5 | + { |
| 6 | + new LayoutData{ Month = "2023-Jan", Sales = 36}, |
| 7 | + new LayoutData{ Month = "2023-Feb", Sales = 62}, |
| 8 | + new LayoutData{ Month = "2023-Mar", Sales = 81}, |
| 9 | + new LayoutData{ Month = "2023-Apr", Sales = 59}, |
| 10 | + new LayoutData{ Month = "2023-May", Sales = 89}, |
| 11 | + new LayoutData{ Month = "2023-Jun", Sales = 72}, |
| 12 | + }; |
| 13 | + |
| 14 | + List<LayoutData> SalesData2 = new List<LayoutData>() |
| 15 | + { |
| 16 | + new LayoutData{ Month = "2023-Jul", Sales = 43}, |
| 17 | + new LayoutData{ Month = "2023-Aug", Sales = 46}, |
| 18 | + new LayoutData{ Month = "2023-Sep", Sales = 55}, |
| 19 | + new LayoutData{ Month = "2023-Oct", Sales = 63}, |
| 20 | + new LayoutData{ Month = "2023-Nov", Sales = 57}, |
| 21 | + new LayoutData{ Month = "2023-Dec", Sales = 80} |
| 22 | + }; |
| 23 | +} |
| 24 | + |
| 25 | +<ejs-chart id="chart" title="Sales - Yearly Performance"> |
| 26 | + <e-chart-primaryxaxis valueType=Category |
| 27 | + labelPlacement=OnTicks |
| 28 | + edgeLabelPlacement=Shift |
| 29 | + isIndexed=true></e-chart-primaryxaxis> |
| 30 | + <e-chart-primaryyaxis title="Sales"></e-chart-primaryyaxis> |
| 31 | + <e-series-collection> |
| 32 | + <e-series type=Column |
| 33 | + dataSource="SalesData" |
| 34 | + name="2023-H1" |
| 35 | + xName="Month" |
| 36 | + yName="Sales"> |
| 37 | + </e-series> |
| 38 | + <e-series type=Column |
| 39 | + dataSource="SalesData2" |
| 40 | + name="2023-H2" |
| 41 | + xName="Month" |
| 42 | + yName="Sales"> |
| 43 | + </e-series> |
| 44 | + </e-series-collection> |
| 45 | +</ejs-chart> |
0 commit comments