Skip to content

Commit

Permalink
added chart type property
Browse files Browse the repository at this point in the history
  • Loading branch information
brianlagunas committed Mar 29, 2024
1 parent e3681f5 commit 781e9b4
Show file tree
Hide file tree
Showing 64 changed files with 1,436 additions and 1,379 deletions.
34 changes: 17 additions & 17 deletions src/Reveal.Sdk.Dom/Visualizations/AreaChartVisualization.cs
Original file line number Diff line number Diff line change
@@ -1,26 +1,26 @@
using Reveal.Sdk.Dom.Data;
using Reveal.Sdk.Dom.Visualizations.Settings;

namespace Reveal.Sdk.Dom.Visualizations
{
using Reveal.Sdk.Dom.Data;
using Reveal.Sdk.Dom.Visualizations.Settings;

namespace Reveal.Sdk.Dom.Visualizations
{
/// <summary>
/// The area chart visualization renders as a collection of points connected by straight line segments with the area below the line filled in. Values are represented on the y-axis and categories are displayed on the x-axis. This chart emphasize the amount of change over a period of time or compare multiple items as well as the relationship of parts of a whole by displaying the total of the plotted values. Therefore, they are often chronological, showing a change of quantity e.g. accumulation of a commodity over time.
/// </summary>
public sealed class AreaChartVisualization : CategoryVisualizationBase<AreaChartVisualizationSettings>
{
internal AreaChartVisualization() : this(null) { }

/// </summary>
public sealed class AreaChartVisualization : CategoryVisualizationBase<AreaChartVisualizationSettings>
{
internal AreaChartVisualization() : this(null) { }

/// <summary>
/// Creates an area chart visualization from the supplied <see cref="DataSourceItem"/>.
/// </summary>
/// <param name="dataSourceItem">The data soure item used to represent a dataset.</param>
public AreaChartVisualization(DataSourceItem dataSourceItem) : base(dataSourceItem) { }

/// <param name="dataSourceItem">The data soure item used to represent a dataset.</param>
public AreaChartVisualization(DataSourceItem dataSourceItem) : this(null, dataSourceItem) { }

/// <summary>
/// Creates an area chart visualization from the supplied <see cref="DataSourceItem"/> and sets the title to the provided string.
/// </summary>
/// <param name="title">The string to use as the visualization's title.</param>
/// <param name="dataSourceItem">The data soure item used to represent a dataset.</param>
public AreaChartVisualization(string title, DataSourceItem dataSourceItem) : base(title, dataSourceItem) { }
}
}
/// <param name="dataSourceItem">The data soure item used to represent a dataset.</param>
public AreaChartVisualization(string title, DataSourceItem dataSourceItem) : base(title, dataSourceItem) { ChartType = ChartType.Area; }
}
}
34 changes: 17 additions & 17 deletions src/Reveal.Sdk.Dom/Visualizations/BarChartVisualization.cs
Original file line number Diff line number Diff line change
@@ -1,26 +1,26 @@
using Reveal.Sdk.Dom.Data;
using Reveal.Sdk.Dom.Visualizations.Settings;

namespace Reveal.Sdk.Dom.Visualizations
{
using Reveal.Sdk.Dom.Data;
using Reveal.Sdk.Dom.Visualizations.Settings;

namespace Reveal.Sdk.Dom.Visualizations
{
/// <summary>
/// The bar chart visualization is among the most common category chart types used to quickly compare frequency, count, total, or  average of data in different categories with data encoded by horizontal bars with equal heights but different lengths. This chart is ideal for showing variations in the value of an item over time. Data is represented using a collection of rectangles that extend from the left to right of the chart towards the values of data points.
/// </summary>
public sealed class BarChartVisualization : CategoryVisualizationBase<BarChartVisualizationSettings>
{
internal BarChartVisualization() : this(null) { }

/// </summary>
public sealed class BarChartVisualization : CategoryVisualizationBase<BarChartVisualizationSettings>
{
internal BarChartVisualization() : this(null) { }

/// <summary>
/// Creates a bar chart visualization from the supplied <see cref="DataSourceItem"/>.
/// </summary>
/// <param name="dataSourceItem">The data soure item used to represent a dataset.</param>
public BarChartVisualization(DataSourceItem dataSourceItem) : base(dataSourceItem) { }

/// <param name="dataSourceItem">The data soure item used to represent a dataset.</param>
public BarChartVisualization(DataSourceItem dataSourceItem) : this(null, dataSourceItem) { }

/// <summary>
/// Creates a bar chart visualization from the supplied <see cref="DataSourceItem"/> and sets the title to the provided string.
/// </summary>
/// <param name="title">The string to use as the visualization's title.</param>
/// <param name="dataSourceItem">The data soure item used to represent a dataset.</param>
public BarChartVisualization(string title, DataSourceItem dataSourceItem) : base(title, dataSourceItem) { }
}
}
/// <param name="dataSourceItem">The data soure item used to represent a dataset.</param>
public BarChartVisualization(string title, DataSourceItem dataSourceItem) : base(title, dataSourceItem) { ChartType = ChartType.Bar; }
}
}
2 changes: 1 addition & 1 deletion src/Reveal.Sdk.Dom/Visualizations/BubbleVisualization.cs
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ public BubbleVisualization(DataSourceItem dataSourceItem) : this(null, dataSourc
/// </summary>
/// <param name="title">The string to use as the visualization's title.</param>
/// <param name="dataSourceItem">The data soure item used to represent a dataset.</param>
public BubbleVisualization(string title, DataSourceItem dataSourceItem) : base(title, dataSourceItem) { }
public BubbleVisualization(string title, DataSourceItem dataSourceItem) : base(title, dataSourceItem) { ChartType = ChartType.Bubble; }

[JsonProperty(Order = 7)]
BubbleVisualizationDataSpec VisualizationDataSpec { get; set; } = new BubbleVisualizationDataSpec();
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ public BulletGraphVisualization(DataSourceItem dataSourceItem) : this(null, data
/// </summary>
/// <param name="title">The string to use as the visualization's title.</param>
/// <param name="dataSourceItem">The data soure item used to represent a dataset.</param>
public BulletGraphVisualization(string title, DataSourceItem dataSourceItem) : base(title, dataSourceItem) { }
public BulletGraphVisualization(string title, DataSourceItem dataSourceItem) : base(title, dataSourceItem) { ChartType = ChartType.BulletGraph; }

[JsonIgnore]
public List<MeasureColumn> Targets { get { return VisualizationDataSpec.Target; } }
Expand Down
34 changes: 17 additions & 17 deletions src/Reveal.Sdk.Dom/Visualizations/CandleStickVisualization.cs
Original file line number Diff line number Diff line change
@@ -1,26 +1,26 @@
using Reveal.Sdk.Dom.Data;
using Reveal.Sdk.Dom.Visualizations.Settings;

namespace Reveal.Sdk.Dom.Visualizations
{
using Reveal.Sdk.Dom.Data;
using Reveal.Sdk.Dom.Visualizations.Settings;

namespace Reveal.Sdk.Dom.Visualizations
{
/// <summary>
/// The candlestick visualization is used for the technical analysis of the price ranges. A candlestick chart compares the high and low prices of a day to the open and close of the ticker symbol.
/// </summary>
public sealed class CandleStickVisualization : FinancialVisualizationBase<CandleStickVisualizationSettings>
{
internal CandleStickVisualization() : this(null) { }

/// </summary>
public sealed class CandleStickVisualization : FinancialVisualizationBase<CandleStickVisualizationSettings>
{
internal CandleStickVisualization() : this(null) { }

/// <summary>
/// Creates a candlestick visualization from the supplied <see cref="DataSourceItem"/>.
/// </summary>
/// <param name="dataSourceItem">The data soure item used to represent a dataset.</param>
public CandleStickVisualization(DataSourceItem dataSourceItem) : this(null, dataSourceItem) { }

/// <param name="dataSourceItem">The data soure item used to represent a dataset.</param>
public CandleStickVisualization(DataSourceItem dataSourceItem) : this(null, dataSourceItem) { }

/// <summary>
/// Creates a candlestick visualization from the supplied <see cref="DataSourceItem"/> and sets the title to the provided string.
/// </summary>
/// <param name="title">The string to use as the visualization's title.</param>
/// <param name="dataSourceItem">The data soure item used to represent a dataset.</param>
public CandleStickVisualization(string title, DataSourceItem dataSourceItem) : base(title, dataSourceItem) { }
}
}
/// <param name="dataSourceItem">The data soure item used to represent a dataset.</param>
public CandleStickVisualization(string title, DataSourceItem dataSourceItem) : base(title, dataSourceItem) { ChartType = ChartType.Candlestick; }
}
}
98 changes: 49 additions & 49 deletions src/Reveal.Sdk.Dom/Visualizations/ChoroplethVisualization.cs
Original file line number Diff line number Diff line change
@@ -1,58 +1,58 @@
using Newtonsoft.Json;
using Reveal.Sdk.Dom.Data;
using Reveal.Sdk.Dom.Visualizations.Settings;
using Reveal.Sdk.Dom.Visualizations.VisualizationSpecs;
using System.Collections.Generic;

namespace Reveal.Sdk.Dom.Visualizations
{
using Newtonsoft.Json;
using Reveal.Sdk.Dom.Data;
using Reveal.Sdk.Dom.Visualizations.Settings;
using Reveal.Sdk.Dom.Visualizations.VisualizationSpecs;
using System.Collections.Generic;

namespace Reveal.Sdk.Dom.Visualizations
{
/// <summary>
/// The choropleth visualization is used to display geo-spatial data using shape polygons in a geographic context. This type of visualization is often used to render shapes of countries or regions defined by geographic locations.
/// </summary>
public sealed class ChoroplethVisualization : TabularVisualizationBase<ChoroplethVisualizationSettings>, IValues, IMap
{
internal ChoroplethVisualization() : this(null) { }

/// </summary>
public sealed class ChoroplethVisualization : TabularVisualizationBase<ChoroplethVisualizationSettings>, IValues, IMap
{
internal ChoroplethVisualization() : this(null) { }

/// <summary>
/// Creates a choropleth visualization from the supplied <see cref="DataSourceItem"/>.
/// </summary>
/// <param name="dataSourceItem">The data soure item used to represent a dataset.</param>
public ChoroplethVisualization(DataSourceItem dataSourceItem) : this(null, dataSourceItem) { }

/// <param name="dataSourceItem">The data soure item used to represent a dataset.</param>
public ChoroplethVisualization(DataSourceItem dataSourceItem) : this(null, dataSourceItem) { }

/// <summary>
/// Creates a choropleth visualization from the supplied <see cref="DataSourceItem"/> and sets the title to the provided string.
/// </summary>
/// <param name="title">The string to use as the visualization's title.</param>
/// <param name="dataSourceItem">The data soure item used to represent a dataset.</param>
public ChoroplethVisualization(string title, DataSourceItem dataSourceItem) : base(title, dataSourceItem) { }

[JsonProperty(Order = 7)]
ChoroplethVisualizationDataSpec VisualizationDataSpec { get; set; } = new ChoroplethVisualizationDataSpec();

[JsonIgnore]
public string Map
{
get { return Settings.Region; }
set { Settings.Region = value; }
}

[JsonIgnore]
public List<DimensionColumn> Locations
{
get { return VisualizationDataSpec.Rows; }
}

[JsonIgnore]
public DimensionColumn MapColor
{
get { return VisualizationDataSpec.MapColor; }
set { VisualizationDataSpec.MapColor = value; }
}

[JsonIgnore]
public List<MeasureColumn> Values
{
get { return VisualizationDataSpec.Value; }
}
}
}
/// <param name="dataSourceItem">The data soure item used to represent a dataset.</param>
public ChoroplethVisualization(string title, DataSourceItem dataSourceItem) : base(title, dataSourceItem) { ChartType = ChartType.Choropleth; }

[JsonProperty(Order = 7)]
ChoroplethVisualizationDataSpec VisualizationDataSpec { get; set; } = new ChoroplethVisualizationDataSpec();

[JsonIgnore]
public string Map
{
get { return Settings.Region; }
set { Settings.Region = value; }
}

[JsonIgnore]
public List<DimensionColumn> Locations
{
get { return VisualizationDataSpec.Rows; }
}

[JsonIgnore]
public DimensionColumn MapColor
{
get { return VisualizationDataSpec.MapColor; }
set { VisualizationDataSpec.MapColor = value; }
}

[JsonIgnore]
public List<MeasureColumn> Values
{
get { return VisualizationDataSpec.Value; }
}
}
}
34 changes: 17 additions & 17 deletions src/Reveal.Sdk.Dom/Visualizations/CircularGaugeVisualization.cs
Original file line number Diff line number Diff line change
@@ -1,26 +1,26 @@
using Reveal.Sdk.Dom.Data;
using Reveal.Sdk.Dom.Visualizations.Settings;

namespace Reveal.Sdk.Dom.Visualizations
{
using Reveal.Sdk.Dom.Data;
using Reveal.Sdk.Dom.Visualizations.Settings;

namespace Reveal.Sdk.Dom.Visualizations
{
/// <summary>
/// The circular gauge visualization displays a semi circle that contains minimum and maximum thresholds along with the current value. The circular gauge paints the scale background with the color of the current range.
/// </summary>
public sealed class CircularGaugeVisualization : SingleGaugeVisualizationBase<CircularGaugeVisualizationSettings>
{
internal CircularGaugeVisualization() : this(null) { }

/// </summary>
public sealed class CircularGaugeVisualization : SingleGaugeVisualizationBase<CircularGaugeVisualizationSettings>
{
internal CircularGaugeVisualization() : this(null) { }

/// <summary>
/// Creates a circular gauge visualization from the supplied <see cref="DataSourceItem"/>.
/// </summary>
/// <param name="dataSourceItem">The data soure item used to represent a dataset.</param>
public CircularGaugeVisualization(DataSourceItem dataSourceItem) : this(null, dataSourceItem) { }

/// <param name="dataSourceItem">The data soure item used to represent a dataset.</param>
public CircularGaugeVisualization(DataSourceItem dataSourceItem) : this(null, dataSourceItem) { }

/// <summary>
/// Creates a circular gauge visualization from the supplied <see cref="DataSourceItem"/> and sets the title to the provided string.
/// </summary>
/// <param name="title">The string to use as the visualization's title.</param>
/// <param name="dataSourceItem">The data soure item used to represent a dataset.</param>
public CircularGaugeVisualization(string title, DataSourceItem dataSourceItem) : base(title, dataSourceItem) { }
}
}
/// <param name="dataSourceItem">The data soure item used to represent a dataset.</param>
public CircularGaugeVisualization(string title, DataSourceItem dataSourceItem) : base(title, dataSourceItem) { ChartType = ChartType.CircularGauge; }
}
}
34 changes: 17 additions & 17 deletions src/Reveal.Sdk.Dom/Visualizations/ColumnChartVisualization.cs
Original file line number Diff line number Diff line change
@@ -1,26 +1,26 @@
using Reveal.Sdk.Dom.Data;
using Reveal.Sdk.Dom.Visualizations.Settings;

namespace Reveal.Sdk.Dom.Visualizations
{
using Reveal.Sdk.Dom.Data;
using Reveal.Sdk.Dom.Visualizations.Settings;

namespace Reveal.Sdk.Dom.Visualizations
{
/// <summary>
/// The column chart visualization is among the most common category chart types used to quickly compare frequency, count, total, or average of data in different categories with data encoded by columns with equal widths but different heights. These columns extend from the bottom to top of the chart towards the values of data points. This chart emphasizes the amount of change over a period of time or compares multiple items.
/// </summary>
public sealed class ColumnChartVisualization : CategoryVisualizationBase<ColumnChartVisualizationSettings>
{
internal ColumnChartVisualization() : this(null) { }

/// </summary>
public sealed class ColumnChartVisualization : CategoryVisualizationBase<ColumnChartVisualizationSettings>
{
internal ColumnChartVisualization() : this(null) { }

/// <summary>
/// Creates a column chart visualization from the supplied <see cref="DataSourceItem"/>.
/// </summary>
/// <param name="dataSourceItem">The data soure item used to represent a dataset.</param>
public ColumnChartVisualization(DataSourceItem dataSourceItem) : base(dataSourceItem) { }

/// <param name="dataSourceItem">The data soure item used to represent a dataset.</param>
public ColumnChartVisualization(DataSourceItem dataSourceItem) : this(null, dataSourceItem) { }

/// <summary>
/// Creates a column chart visualization from the supplied <see cref="DataSourceItem"/> and sets the title to the provided string.
/// </summary>
/// <param name="title">The string to use as the visualization's title.</param>
/// <param name="dataSourceItem">The data soure item used to represent a dataset.</param>
public ColumnChartVisualization(string title, DataSourceItem dataSourceItem) : base(title, dataSourceItem) { }
}
}
/// <param name="dataSourceItem">The data soure item used to represent a dataset.</param>
public ColumnChartVisualization(string title, DataSourceItem dataSourceItem) : base(title, dataSourceItem) { ChartType = ChartType.Column; }
}
}
Loading

0 comments on commit 781e9b4

Please sign in to comment.