|
| 1 | +@page |
| 2 | +@model IndexModel |
| 3 | +@{ |
| 4 | + List<ChartData> SalesData = new List<ChartData>() |
| 5 | + { |
| 6 | + new ChartData { Date = new DateTime(2015, 1, 1), ProfitInfo = 80 }, |
| 7 | + new ChartData { Date = new DateTime(2016, 1, 1), ProfitInfo = 200 }, |
| 8 | + new ChartData { Date = new DateTime(2017, 1, 1), ProfitInfo = 400 }, |
| 9 | + new ChartData { Date = new DateTime(2018, 1, 1), ProfitInfo = 600 }, |
| 10 | + new ChartData { Date = new DateTime(2019, 1, 1), ProfitInfo = 700 }, |
| 11 | + new ChartData { Date = new DateTime(2020, 1, 1), ProfitInfo = 1400 }, |
| 12 | + new ChartData { Date = new DateTime(2021, 1, 1), ProfitInfo = 2000 }, |
| 13 | + new ChartData { Date = new DateTime(2022, 1, 1), ProfitInfo = 4000 }, |
| 14 | + new ChartData { Date = new DateTime(2023, 1, 1), ProfitInfo = 6000 }, |
| 15 | + new ChartData { Date = new DateTime(2024, 1, 1), ProfitInfo = 8000 }, |
| 16 | + new ChartData { Date = new DateTime(2025, 1, 1), ProfitInfo = 11000 } |
| 17 | + }; |
| 18 | +} |
| 19 | + |
| 20 | +<ejs-chart id="chart" title="Product Growth"> |
| 21 | + <e-chart-primaryxaxis valueType=DateTime labelFormat="y" title="Year" |
| 22 | + edgeLabelPlacement=Shift></e-chart-primaryxaxis> |
| 23 | + <e-chart-primaryyaxis valueType=Logarithmic title="Profit" |
| 24 | + logBase=2 |
| 25 | + labelFormat="${value}"></e-chart-primaryyaxis> |
| 26 | + @* minimum=100 |
| 27 | + maximum=1000000 |
| 28 | + interval=2 *@ |
| 29 | + <e-series-collection> |
| 30 | + <e-series type=Line |
| 31 | + dataSource="SalesData" |
| 32 | + xName="Date" |
| 33 | + yName="ProfitInfo"> |
| 34 | + <e-series-marker visible=true></e-series-marker> |
| 35 | + </e-series> |
| 36 | + </e-series-collection> |
| 37 | +</ejs-chart> |
0 commit comments