@@ -292,18 +292,18 @@ public void SetRerenderChart()
292
292
forceRender = true ;
293
293
}
294
294
295
- public async Task RenderAsync ( )
295
+ public virtual async Task RenderAsync ( )
296
296
{
297
297
await RenderChartAsync ( ) ;
298
298
}
299
299
300
- public async Task AddPointAnnotationAsync ( AnnotationsPoint annotationsPoint , bool pushToMemory )
300
+ public virtual async Task AddPointAnnotationAsync ( AnnotationsPoint annotationsPoint , bool pushToMemory )
301
301
{
302
302
var json = Serialize ( annotationsPoint ) ;
303
303
await JSRuntime . InvokeVoidAsync ( "blazor_apexchart.addPointAnnotation" , Options . Chart . Id , json , pushToMemory ) ;
304
304
}
305
305
306
- public async Task AppendDataAsync ( IEnumerable < TItem > items )
306
+ public virtual async Task AppendDataAsync ( IEnumerable < TItem > items )
307
307
{
308
308
309
309
if ( IsNoAxisChart && Series . Any ( ) )
@@ -345,59 +345,59 @@ public async Task AppendDataAsync(IEnumerable<TItem> items)
345
345
await JSRuntime . InvokeVoidAsync ( "blazor_apexchart.appendData" , Options . Chart . Id , json ) ;
346
346
}
347
347
348
- public async Task ZoomXAsync ( ZoomOptions zoomOptions )
348
+ public virtual async Task ZoomXAsync ( ZoomOptions zoomOptions )
349
349
{
350
350
if ( zoomOptions == null ) { throw new ArgumentNullException ( nameof ( zoomOptions ) ) ; }
351
351
await JSRuntime . InvokeVoidAsync ( "blazor_apexchart.zoomX" , Options . Chart . Id , zoomOptions . Start , zoomOptions . End ) ;
352
352
}
353
353
354
- public async Task ZoomXAsync ( decimal start , decimal end )
354
+ public virtual async Task ZoomXAsync ( decimal start , decimal end )
355
355
{
356
356
await JSRuntime . InvokeVoidAsync ( "blazor_apexchart.zoomX" , Options . Chart . Id , start , end ) ;
357
357
}
358
358
359
- public async Task ResetSeriesAsync ( bool shouldUpdateChart , bool shouldResetZoom )
359
+ public virtual async Task ResetSeriesAsync ( bool shouldUpdateChart , bool shouldResetZoom )
360
360
{
361
361
await JSRuntime . InvokeVoidAsync ( "blazor_apexchart.resetSeries" , Options . Chart . Id , shouldUpdateChart , shouldResetZoom ) ;
362
362
}
363
363
364
- public async Task < string > GetDataUriAsync ( DataUriOptions dataUriOptions )
364
+ public virtual async Task < string > GetDataUriAsync ( DataUriOptions dataUriOptions )
365
365
{
366
366
var json = Serialize ( dataUriOptions ) ;
367
367
var result = await JSRuntime . InvokeAsync < DataUriResult > ( "blazor_apexchart.dataUri" , Options . Chart . Id , json ) ;
368
368
return result . ImgURI ;
369
369
}
370
370
371
- public async Task AddXAxisAnnotationAsync ( AnnotationsXAxis annotationsXAxis , bool pushToMemory )
371
+ public virtual async Task AddXAxisAnnotationAsync ( AnnotationsXAxis annotationsXAxis , bool pushToMemory )
372
372
{
373
373
var json = Serialize ( annotationsXAxis ) ;
374
374
await JSRuntime . InvokeVoidAsync ( "blazor_apexchart.addXaxisAnnotation" , Options . Chart . Id , json , pushToMemory ) ;
375
375
}
376
376
377
- public async Task AddYAxisAnnotationAsync ( AnnotationsYAxis annotationsYAxis , bool pushToMemory )
377
+ public virtual async Task AddYAxisAnnotationAsync ( AnnotationsYAxis annotationsYAxis , bool pushToMemory )
378
378
{
379
379
var json = Serialize ( annotationsYAxis ) ;
380
380
await JSRuntime . InvokeVoidAsync ( "blazor_apexchart.addYaxisAnnotation" , Options . Chart . Id , json , pushToMemory ) ;
381
381
}
382
382
383
- public async Task ClearAnnotationsAsync ( )
383
+ public virtual async Task ClearAnnotationsAsync ( )
384
384
{
385
385
await JSRuntime . InvokeVoidAsync ( "blazor_apexchart.clearAnnotations" , Options . Chart . Id ) ;
386
386
}
387
387
388
- public async Task RemoveAnnotationAsync ( string id )
388
+ public virtual async Task RemoveAnnotationAsync ( string id )
389
389
{
390
390
await JSRuntime . InvokeVoidAsync ( "blazor_apexchart.removeAnnotation" , Options . Chart . Id , id ) ;
391
391
}
392
392
393
- public async Task UpdateOptionsAsync ( bool redrawPaths , bool animate , bool updateSyncedCharts , ZoomOptions zoom = null )
393
+ public virtual async Task UpdateOptionsAsync ( bool redrawPaths , bool animate , bool updateSyncedCharts , ZoomOptions zoom = null )
394
394
{
395
395
PrepareChart ( ) ;
396
396
var json = Serialize ( Options ) ;
397
397
await JSRuntime . InvokeVoidAsync ( "blazor_apexchart.updateOptions" , Options . Chart . Id , json , redrawPaths , animate , updateSyncedCharts , zoom ) ;
398
398
}
399
399
400
- public async Task UpdateSeriesAsync ( bool animate = true )
400
+ public virtual async Task UpdateSeriesAsync ( bool animate = true )
401
401
{
402
402
SetSeries ( ) ;
403
403
UpdateDataForNoAxisCharts ( ) ;
@@ -412,23 +412,23 @@ public async Task UpdateSeriesAsync(bool animate = true)
412
412
/// <param name="seriesIndex"></param>
413
413
/// <param name="dataPointIndex"></param>
414
414
/// <returns></returns>
415
- public async Task ToggleDataPointSelectionAsync ( int seriesIndex , int ? dataPointIndex )
415
+ public virtual async Task ToggleDataPointSelectionAsync ( int seriesIndex , int ? dataPointIndex )
416
416
{
417
417
await JSRuntime . InvokeVoidAsync ( "blazor_apexchart.toggleDataPointSelection" , Options . Chart . Id , seriesIndex , dataPointIndex ) ;
418
418
419
419
}
420
420
421
- public async Task ToggleSeriesAsync ( string seriesName )
421
+ public virtual async Task ToggleSeriesAsync ( string seriesName )
422
422
{
423
423
await JSRuntime . InvokeVoidAsync ( "blazor_apexchart.toggleSeries" , Options . Chart . Id , seriesName ) ;
424
424
}
425
425
426
- public async Task ShowSeriesAsync ( string seriesName )
426
+ public virtual async Task ShowSeriesAsync ( string seriesName )
427
427
{
428
428
await JSRuntime . InvokeVoidAsync ( "blazor_apexchart.showSeries" , Options . Chart . Id , seriesName ) ;
429
429
}
430
430
431
- public async Task HideSeriesAsync ( string seriesName )
431
+ public virtual async Task HideSeriesAsync ( string seriesName )
432
432
{
433
433
await JSRuntime . InvokeVoidAsync ( "blazor_apexchart.hideSeries" , Options . Chart . Id , seriesName ) ;
434
434
}
0 commit comments