Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -351,3 +351,4 @@ MigrationBackup/

# XML Documentation file
Blazor-ApexCharts.xml
/src/Blazor-ApexCharts-MAUI/Blazor-ApexCharts-MAUI.xml
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@
"BlazorApexCharts.Docs.Server": {
"commandName": "Project",
"launchBrowser": true,
"launchUrl": "issues/dynamic-options",
"launchUrl": "bar-charts",
"environmentVariables": {
"ASPNETCORE_ENVIRONMENT": "Development"
},
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -63,7 +63,7 @@
},

Colors = new List<string> { "#77B6EA", "#545454" },
Markers = new Markers { Shape = ShapeEnum.Circle, Size = 5, FillOpacity = new Opacity(0.8d) },
Markers = new Markers { Shape = MarkerShape.Circle, Size = 5, FillOpacity = new Opacity(0.8d) },
Stroke = new Stroke { Curve = Curve.Smooth },
Legend = new Legend
{
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -62,7 +62,7 @@
}
},
Colors = new List<string> { "#77B6EA", "#545454" },
Markers = new Markers { Shape = ShapeEnum.Circle, Size = 5, FillOpacity = new Opacity(0.8d) },
Markers = new Markers { Shape = MarkerShape.Circle, Size = 5, FillOpacity = new Opacity(0.8d) },
Stroke = new Stroke { Curve = Curve.Smooth },
Legend = new Legend
{
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -28,6 +28,7 @@
SeriesIndex = 0,
DataPointIndex = 2,
Size = 10,
Shape = MarkerShape.Diamond,
FillColor = "#F30707"
}
}
Expand Down
72 changes: 0 additions & 72 deletions src/Blazor-ApexCharts-MAUI/Blazor-ApexCharts-MAUI.xml

This file was deleted.

62 changes: 40 additions & 22 deletions src/Blazor-ApexCharts/Models/ApexChartOptions.cs
Original file line number Diff line number Diff line change
Expand Up @@ -644,7 +644,7 @@ public class AnnotationMarker
/// <summary>
/// Shape of the marker.
/// </summary>
public ShapeEnum Shape { get; set; }
public AnnotationMarkerShape? Shape { get; set; }

/// <summary>
/// Size of the marker.
Expand Down Expand Up @@ -1092,7 +1092,7 @@ public class ExportPng
/// </summary>
public class ExportCSV
{

/// <summary>
/// Name of the csv file. Defaults to auto generated chart ID
/// </summary>
Expand Down Expand Up @@ -1683,7 +1683,7 @@ public class Zoom
/// <inheritdoc cref="ApexCharts.ZoomedArea" />
public ZoomedArea ZoomedArea { get; set; }

/// <summary>
/// <summary>
/// Allow use of the mouse wheel to perform zoom. Default is true.
/// </summary>
/// <remarks>
Expand Down Expand Up @@ -2335,7 +2335,7 @@ public class Legend

}



/// <summary>
/// Undocumented, this class exists in the TypeScript definition
Expand Down Expand Up @@ -2536,7 +2536,7 @@ public class Markers
/// <summary>
/// Shape of the marker.
/// </summary>
public ShapeEnum? Shape { get; set; }
public MarkerShapeSelections Shape { get; set; }

/// <summary>
/// Whether to show markers for null values in a line/area chart. If disabled, any null values present in line/area charts will not be visible.
Expand Down Expand Up @@ -2617,7 +2617,7 @@ public class MarkersDiscrete
/// <summary>
/// The type of shape to use for the marker
/// </summary>
public ShapeEnum? Shape { get; set; }
public MarkerShape? Shape { get; set; }
}

/// <summary>
Expand Down Expand Up @@ -2742,7 +2742,7 @@ public class PlotOptions

/// <inheritdoc cref="ApexCharts.PlotOptionsLine" />
public PlotOptionsLine Line { get; set; }

}

/// <summary>
Expand Down Expand Up @@ -2786,17 +2786,17 @@ public class LineColors
public string ColorBelowThreshold { get; set; }
}

/// <summary>
/// Defines options specific to <see cref="ChartType.Area"/>
/// </summary>
/// <remarks>
/// Links:
///
/// <see href="https://apexcharts.github.io/Blazor-ApexCharts/area-charts">Blazor Example</see>,
/// <see href="https://apexcharts.com/docs/chart-types/area-chart">JavaScript Documentation</see>,
/// <see href="https://apexcharts.com/docs/options/plotoptions/area">JavaScript Reference</see>
/// </remarks>
public class PlotOptionsArea
/// <summary>
/// Defines options specific to <see cref="ChartType.Area"/>
/// </summary>
/// <remarks>
/// Links:
///
/// <see href="https://apexcharts.github.io/Blazor-ApexCharts/area-charts">Blazor Example</see>,
/// <see href="https://apexcharts.com/docs/chart-types/area-chart">JavaScript Documentation</see>,
/// <see href="https://apexcharts.com/docs/options/plotoptions/area">JavaScript Reference</see>
/// </remarks>
public class PlotOptionsArea
{
/// <summary>
/// When negative values are present in the area chart, this option fill the area either from 0 (origin) or from the end of the chart as illustrated below.
Expand Down Expand Up @@ -3910,7 +3910,7 @@ public class Responsive<TItem> where TItem : class
/// <summary>
/// The new configuration object that you would like to override on the existing default configuration object. All the options which you set normally can be set here. <see href="https://codepen.io/apexcharts/pen/ajpqJp">Example</see>
/// </summary>
public ApexChartOptions<TItem> Options { get; set; }
public ApexChartOptions<TItem> Options { get; set; }
}

/// <summary>
Expand Down Expand Up @@ -5526,15 +5526,33 @@ public enum XAxisPosition
};

/// <summary>
/// A list of shapes to generate data point markers with
/// Annotation Markers shape
/// </summary>
public enum ShapeEnum
public enum AnnotationMarkerShape
{
Circle,
Square,
Rect
};


/// <summary>
/// Markers Shape
/// </summary>
public enum MarkerShape
{
Circle,
Square,
Line,
Plus,
Cross,
Star,
Sparkle,
Diamond,
Triangle,

};


/// <summary>
/// Orientation options for the Clustered Grouped Series
/// </summary>
Expand Down
35 changes: 35 additions & 0 deletions src/Blazor-ApexCharts/Models/MultiType/MarkerShapeSelections.cs
Original file line number Diff line number Diff line change
@@ -0,0 +1,35 @@
using System.Collections.Generic;

namespace ApexCharts
{
/// <remarks>
/// Accepts either a single value or collection of values. Providing a collection of values in a multi-series chart will assign fill types where each index corresponds to the series index.<br /><br />
/// </remarks>
public class MarkerShapeSelections : ValueOrList<MarkerShape>
{
/// <summary>
/// Converts a fill type collection into a list of fill types
/// </summary>
public static implicit operator List<MarkerShape>(MarkerShapeSelections source) => source.values;

/// <summary>
/// Converts a list of fill types into a fill type collection
/// </summary>
public static implicit operator MarkerShapeSelections(List<MarkerShape> source) => new(source);

/// <summary>
/// Converts a fill type into a fill type collection
/// </summary>
public static implicit operator MarkerShapeSelections(MarkerShape source) => new(source);

/// <summary>
/// Creates a new collection of fill types with the provided values
/// </summary>
public MarkerShapeSelections(params MarkerShape[] values) : base(values) { }

/// <summary>
/// Creates a new collection of fill types with the provided values
/// </summary>
public MarkerShapeSelections(IEnumerable<MarkerShape> values) : base(values) { }
}
}