@@ -20,7 +20,6 @@ public partial class ApexChart<TItem> : IDisposable where TItem : class
20
20
[ Parameter ] public string Title { get ; set ; }
21
21
[ Parameter ] public XAxisType ? XAxisType { get ; set ; }
22
22
[ Parameter ] public bool Debug { get ; set ; }
23
- [ Parameter ] public JSInteropStrategy JSInteropStrategy { get ; set ; }
24
23
[ Parameter ] public object Width { get ; set ; }
25
24
[ Parameter ] public object Height { get ; set ; }
26
25
[ Parameter ] public EventCallback < SelectedData < TItem > > OnDataPointSelection { get ; set ; }
@@ -39,20 +38,9 @@ public partial class ApexChart<TItem> : IDisposable where TItem : class
39
38
private bool forceRender = true ;
40
39
private string chartId ;
41
40
public string ChartId => ChartId ;
42
- private IJSUnmarshalledRuntime jsUnmarshalled ;
43
- private IJSInProcessRuntime jsInprocess ;
44
41
45
- private bool isWasm ;
46
42
47
- protected override void OnInitialized ( )
48
- {
49
- isWasm = JSRuntime is IJSInProcessRuntime ;
50
- if ( isWasm )
51
- {
52
- jsInprocess = ( IJSInProcessRuntime ) JSRuntime ;
53
- jsUnmarshalled = ( IJSUnmarshalledRuntime ) ServiceProvider . GetService ( typeof ( IJSUnmarshalledRuntime ) ) ;
54
- }
55
- }
43
+
56
44
57
45
protected override async Task OnAfterRenderAsync ( bool firstRender )
58
46
{
@@ -354,37 +342,10 @@ public async Task UpdateOptionsAsync(bool redrawPaths, bool animate, bool update
354
342
355
343
public async Task UpdateSeriesAsync ( bool animate = true )
356
344
{
357
- var sw = new Stopwatch ( ) ;
358
- sw . Start ( ) ;
359
-
360
345
SetSeries ( ) ;
361
- Console . WriteLine ( $ "SetSeries { sw . ElapsedMilliseconds } ") ;
362
346
UpdateDataForNoAxisCharts ( ) ;
363
- Console . WriteLine ( $ "UpdateDataForNoAxisCharts { sw . ElapsedMilliseconds } ") ;
364
347
var jsonSeries = Serialize ( Options . Series ) ;
365
- Console . WriteLine ( $ "Serialize { sw . ElapsedMilliseconds } ") ;
366
-
367
-
368
- if ( jsUnmarshalled != null && JSInteropStrategy == JSInteropStrategy . UnMarshalled )
369
- {
370
- jsUnmarshalled . InvokeUnmarshalled < string , string , string , string > ( "blazor_apexchart.testUnmarshalled" , Options . Chart . Id , jsonSeries , animate . ToString ( ) . ToLower ( ) ) ;
371
- Console . WriteLine ( $ "Invoke Unmarshalled { sw . ElapsedMilliseconds } ") ;
372
-
373
- }
374
- else if ( jsInprocess != null && JSInteropStrategy == JSInteropStrategy . Sync )
375
- {
376
- jsInprocess . InvokeVoid ( "blazor_apexchart.updateSeries" , Options . Chart . Id , jsonSeries , animate ) ;
377
- Console . WriteLine ( $ "Invoke Sync { sw . ElapsedMilliseconds } ") ;
378
-
379
- }
380
- else
381
- {
382
- await JSRuntime . InvokeVoidAsync ( "blazor_apexchart.updateSeries" , Options . Chart . Id , jsonSeries , animate ) ;
383
- Console . WriteLine ( $ "Invoke Async { sw . ElapsedMilliseconds } ") ;
384
-
385
- }
386
-
387
- sw . Stop ( ) ;
348
+ await JSRuntime . InvokeVoidAsync ( "blazor_apexchart.updateSeries" , Options . Chart . Id , jsonSeries , animate ) ;
388
349
}
389
350
390
351
0 commit comments