Skip to main content
Version: 4.2

ChartView

Namespace: Wisej.Web

Assembly: Wisej.Framework (4.2.0.0)

Displays themed charts with mixed series, data binding, interactive legends, and zoom.

public class ChartView : Control

Derives from or implements Control, IWisejControl.

  • DataSource Gets or sets the shared enumerable or list source used by series without a source.
  • Legend Gets or sets the position of the interactive legend.
  • Tooltip Gets or sets single, shared, or disabled point tooltips.

Example:

var chart = new ChartView { DataSource = sales };
chart.Series.Add(new ChartSeries { Name = "Revenue", ChartType = ChartType.Column, ValueMember = "Revenue", CategoryMember = "Quarter" });
this.Controls.Add(chart);

Constructors​

Instance member ChartView()​

Creates a chart and observes changes to its series, axes, and annotations.

Properties​

Instance member Animated​

Boolean: Gets or sets whether chart updates fade into view. (Default: True)

Instance member Annotations​

ChartAnnotationCollection: Gets the observable Annotations configuration.

Instance member Crosshair​

Boolean: Gets or sets whether the hovered coordinate is marked by a guide line. (Default: True)

Instance member DataSource​

Object: Gets or sets the shared enumerable or list source used by series without a source. (Default: null)

Protected member DefaultSize​

Size: Gets the default chart size.

Instance member EmptyState​

String: Gets or sets the message displayed when no series has samples. (Default: null)

Null uses the built-in text for the current UI culture. An empty string suppresses the text.

Instance member KeyboardHelpText​

String: Gets or sets the localized override for the "Use arrow keys to inspect points, Enter to activate, Escape to reset zoom." text. (Default: null)

The default is null, which selects the built-in translation for the current UI culture. The getter returns the configured override. An empty string suppresses the text without changing the operation.

Instance member Legend​

ChartLegend: Gets or sets the position of the interactive legend. (Default: Top)

Instance member Palette​

Color[]: Gets or sets a copied array of series colors. An empty array uses theme defaults.

Instance member Series​

SeriesCollection: Gets the observable Series configuration.

Instance member SeriesText​

String: Gets or sets the localized override for the "Series {0}" text. (Default: null)

The default is null, which selects the built-in translation for the current UI culture. The getter returns the configured override. An empty string suppresses the text without changing the operation. {0} is the one-based series number. Literal braces can be written as {{ and }}.

Instance member Title​

String: Gets or sets the chart title. (Default: "")

Instance member TonePalette​

ChartTone[]: Gets or sets a copied array of series colors. An empty array uses theme defaults.

Instance member Tooltip​

ChartTooltip: Gets or sets single, shared, or disabled point tooltips. (Default: Shared)

Instance member XAxis​

ChartAxis: Gets the observable XAxis configuration.

Instance member Y2Axis​

ChartAxis: Gets the observable Y2Axis configuration.

Instance member YAxis​

ChartAxis: Gets the observable YAxis configuration.

Instance member ZoomMode​

ChartZoomMode: Gets or sets the axes affected by drag zoom. Double-click resets zoom. (Default: Off)

Methods​

Protected member Dispose(disposing)​

Releases notifications from shared series and axis models.

ParameterTypeDescription
disposingBooleanWhether managed resources are being released.

Instance member ExportImage(format, fileName)​

Downloads the currently rendered chart, including zoom, legend, and theme colors.

ParameterTypeDescription
format optionalChartImageFormatSVG or PNG.
fileName optionalStringSuggested download name, without an extension.

Export runs in the client browser after the control has appeared. PNG uses the rendered SVG at device resolution.

Protected member OnLegendItemClick(e)​

Raises LegendItemClick.

ParameterTypeDescription
eSeriesPointEventArgsEvent details.

Protected member OnPointClick(e)​

Raises PointClick.

ParameterTypeDescription
eSeriesPointEventArgsEvent details.

Protected member OnSliceClick(e)​

Raises SliceClick.

ParameterTypeDescription
eSeriesPointEventArgsEvent details.

Protected member OnStageClick(e)​

Raises StageClick.

ParameterTypeDescription
eSeriesPointEventArgsEvent details.

Protected member OnTooltipShowing(e)​

Raises TooltipShowing.

ParameterTypeDescription
eChartTooltipEventArgsEvent details.

Protected member OnWebEvent(e)​

Dispatches validated chart interaction notifications.

ParameterTypeDescription
eWisejEventArgsClient event.

Protected member OnWebRender(config)​

Sends fresh sample data and first-level presentation properties while preserving the client widget.

ParameterTypeDescription
configObjectClient configuration.

Protected member OnZoomChanged(e)​

Raises ZoomChanged.

ParameterTypeDescription
eChartZoomEventArgsEvent details.

Instance member ResetZoom()​

Resets the client viewport to the configured axis bounds.

Events​

Instance member LegendItemClick​

EventHandler<SeriesPointEventArgs> Occurs after a legend item toggles its series or categorical slice visibility.

Instance member PointClick​

EventHandler<SeriesPointEventArgs> Occurs when a cartesian point or tile is activated.

Instance member SliceClick​

EventHandler<SeriesPointEventArgs> Occurs when a pie, donut, or polar slice is activated.

Instance member StageClick​

EventHandler<SeriesPointEventArgs> Occurs when a funnel stage is activated.

Instance member TooltipShowing​

EventHandler<ChartTooltipEventArgs> Occurs when a new point tooltip is shown. Set Text or Cancel to replace or hide it.

Instance member ZoomChanged​

EventHandler<ChartZoomEventArgs> Occurs after a user completes drag zoom or resets the viewport.

Implements​

NameDescription
IUserDataProvides access to the UserData and Tag properties associated to the component implementing this interface.
IBindableComponentBindable components implement this interface.
IDropTargetControls that support drag & drop operations implement this interface.
IWisejComponentAll wisej components implement this interface.
IWisejControlAll wisej controls derived from the Control class must implement this interface.
IWisejSerializableAllows an object to serialize itself.