Skip to content

Commit 3807f20

Browse files
authored
Merge pull request #101 from apexcharts/make-dispose-virtual
Make dispose virtual
2 parents 701b2de + 7b75575 commit 3807f20

File tree

4 files changed

+16
-17
lines changed

4 files changed

+16
-17
lines changed

docs/BlazorApexCharts.Docs/Components/ChartTypes/LineCharts/Size.razor

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -23,8 +23,7 @@ Debug>
2323
private List<Order> Orders { get; set; } = SampleData.GetOrders();
2424
private ApexChartOptions<Order> options { get; set; } = new ApexChartOptions<Order>();
2525
private int width = 200;
26-
private int height = 200;
27-
26+
2827
protected override void OnInitialized()
2928
{
3029
options.Chart = new Chart { Width = "300px", Height = "500px" };

docs/BlazorApexCharts.Docs/Components/Methods/ToggleDataPoint/Basic.razor

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -21,8 +21,7 @@
2121
@code {
2222
private List<Order> orders { get; set; } = SampleData.GetOrders();
2323
private ApexChart<Order> chart;
24-
private string message;
25-
24+
2625
private async Task ToggleDataPoint()
2726
{
2827

src/Blazor-ApexCharts/ApexChart.razor.cs

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -76,16 +76,17 @@ protected override void OnParametersSet()
7676

7777
Options.Chart.Id = chartId;
7878
Options.Debug = Debug;
79-
80-
if (Width != null) {
79+
80+
if (Width != null)
81+
{
8182
Options.Chart.Width = Width;
8283
}
8384

8485
if (Height != null)
8586
{
8687
Options.Chart.Height = Height;
8788
}
88-
89+
8990
if (XAxisType != null)
9091
{
9192
if (Options.Xaxis == null) { Options.Xaxis = new XAxis(); }
@@ -548,7 +549,7 @@ private MixedType GetMixedChartType(ChartType chartType)
548549
}
549550

550551

551-
public void Dispose()
552+
public virtual void Dispose()
552553
{
553554
GC.SuppressFinalize(this);
554555
if (Options.Chart?.Id != null && isReady)

src/Blazor-ApexCharts/Models/ApexChartOptions.cs

Lines changed: 9 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -705,7 +705,7 @@ public class LegendItemMargin
705705

706706
public class LegendLabels
707707
{
708-
public Color? Colors { get; set; }
708+
public Color Colors { get; set; }
709709
public bool? UseSeriesColors { get; set; }
710710
}
711711

@@ -735,18 +735,18 @@ public class Markers
735735
{
736736
public List<string> Colors { get; set; }
737737
public List<MarkersDiscrete> Discrete { get; set; }
738-
public Opacity? FillOpacity { get; set; }
738+
public Opacity FillOpacity { get; set; }
739739
public MarkersHover Hover { get; set; }
740740
public double? OffsetX { get; set; }
741741
public double? OffsetY { get; set; }
742742
public double? Radius { get; set; }
743743
public ShapeEnum? Shape { get; set; }
744744
public bool? ShowNullDataPoints { get; set; }
745745
public double? Size { get; set; }
746-
public Color? StrokeColors { get; set; }
747-
public Opacity? StrokeDashArray { get; set; }
748-
public Opacity? StrokeOpacity { get; set; }
749-
public Opacity? StrokeWidth { get; set; }
746+
public Color StrokeColors { get; set; }
747+
public Opacity StrokeDashArray { get; set; }
748+
public Opacity StrokeOpacity { get; set; }
749+
public Opacity StrokeWidth { get; set; }
750750
}
751751

752752
public class MarkersDiscrete
@@ -976,10 +976,10 @@ public class PlotOptionsRadar
976976

977977
public class PurplePolygons
978978
{
979-
public Color? ConnectorColors { get; set; }
979+
public Color ConnectorColors { get; set; }
980980
public TentacledFill Fill { get; set; }
981-
public Color? StrokeColors { get; set; }
982-
public Color? StrokeWidth { get; set; }
981+
public Color StrokeColors { get; set; }
982+
public Color StrokeWidth { get; set; }
983983
}
984984

985985
public class TentacledFill

0 commit comments

Comments
 (0)