Skip to content

Commit

Permalink
Deploying to gh-pages from master @ c2907f1 🚀
Browse files Browse the repository at this point in the history
  • Loading branch information
joadan committed Nov 6, 2023
1 parent 67e466e commit 81d1ca8
Show file tree
Hide file tree
Showing 12 changed files with 25 additions and 5 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@
SeriesType="SeriesType.Line"
XValue="@(e => e.Date)"
YValue="@(e => e.Value)"
OrderByDescending="e=>e.X" />
OrderBy="e=>e.X" />
</ApexChart>
</DemoContainer>

Expand All @@ -23,9 +23,13 @@
private TimeSeriesGenerator generator = new TimeSeriesGenerator(20);
private bool timerInitialized;
private Timer timer;
private DateTimeOffset maxDate;
private int counter;

protected override void OnInitialized()
{


options = new ApexChartOptions<TimeSeries>();

options.Xaxis = new XAxis
Expand Down Expand Up @@ -73,8 +77,24 @@

private async Task UpdateChartSeries()
{
generator.Update();
await chart.UpdateSeriesAsync();

if (counter > 100) //Reset the chart
{
await chart.UpdateSeriesAsync(true);
counter = 0;
maxDate = DateTimeOffset.MinValue;
return;
}

if (maxDate == DateTimeOffset.MinValue)
{
maxDate = generator.TimeSeries.Max(e => e.Date);
}

maxDate = maxDate.AddDays(1);
await chart.AppendDataAsync(new List<TimeSeries> { generator.GenerateNewPoint(maxDate) });
counter++;

}

public void Dispose()
Expand Down
Binary file modified _framework/BlazorApexCharts.Docs.Wasm.dll
Binary file not shown.
Binary file modified _framework/BlazorApexCharts.Docs.Wasm.dll.br
Binary file not shown.
Binary file modified _framework/BlazorApexCharts.Docs.Wasm.dll.gz
Binary file not shown.
Binary file modified _framework/BlazorApexCharts.Docs.Wasm.pdb.gz
Binary file not shown.
Binary file modified _framework/BlazorApexCharts.Docs.dll
Binary file not shown.
Binary file modified _framework/BlazorApexCharts.Docs.dll.br
Binary file not shown.
Binary file modified _framework/BlazorApexCharts.Docs.dll.gz
Binary file not shown.
Binary file modified _framework/BlazorApexCharts.Docs.pdb.gz
Binary file not shown.
4 changes: 2 additions & 2 deletions _framework/blazor.boot.json
Original file line number Diff line number Diff line change
Expand Up @@ -8,8 +8,8 @@
"resources": {
"assembly": {
"Blazor-ApexCharts.dll": "sha256-Yqez3Pblod3FrtYDDEDOSzxf9Z0LxssTSyUhr2lfaUw=",
"BlazorApexCharts.Docs.dll": "sha256-u3pDYxnwwYUXGvAPsedAxkdCG6TdR2o1udTP17LVPX8=",
"BlazorApexCharts.Docs.Wasm.dll": "sha256-SzKURjWDUiiQCv3NdkoE8vBeE\/MNjTL2YdTI77Fkk2g=",
"BlazorApexCharts.Docs.dll": "sha256-\/Rpv\/pue4cIngp7oL9A4q+I5CAr3o4Ic+MYZMoRMDvA=",
"BlazorApexCharts.Docs.Wasm.dll": "sha256-dQDC775EFbBB\/S\/uuuoH7VgOt1vo5ZWMfavV34knwHo=",
"Bogus.dll": "sha256-IgFEwQyP1GQSj7cjhmsEcYuEABesDe9Y3oby2kbVnnc=",
"ColorCode.Core.dll": "sha256-aIfJCjDE9QfwEHpKt97+\/fHH0ahMOa\/TdeVTcU3lBsY=",
"ColorCode.HTML.dll": "sha256-HKP0W0ZaaitLH4eoIUYTqVMArDi2WugRXgZOSjrj9\/k=",
Expand Down
Binary file modified _framework/blazor.boot.json.br
Binary file not shown.
Binary file modified _framework/blazor.boot.json.gz
Binary file not shown.

0 comments on commit 81d1ca8

Please sign in to comment.