Click or drag to resize
NChart Class
The NChart class provides a container for the chart.
Inheritance Hierarchy
SystemObject
  NChart3D_UWPNChart

Namespace:  NChart3D_UWP
Assembly:  NChart3D_UWP (in NChart3D_UWP.dll)
Syntax
public sealed class NChart : IClosable

The NChart type exposes the following members.

Properties
  NameDescription
Public propertyAdaptiveAntialiasing
Flag that determines if anti-aliasing is adaptive (true) or not (false). Adaptivity means that it is switched off automatically for the time-critical periods like user interactions or animation playing. This property takes effect if ShouldAntialias is true only. The default value is true.
Public propertyAlwaysPreserveZoomAndPosition
Flag determining if chart content always preserves zoom and position (true) or not (false). This flag takes effect in 3D mode only. If this flag is set to false, when you change the frame of the chart, 3D content will be zoomed and shifted to fit the screen. If this flag is set to true, you should call ResetTransformations to fit the content in the screen manually. The default value is false. The common use-case for this flag is when you smoothly change the size of the chart. For such resize session you should set this flag to true, and after the session you should probably call ResetTransformations.
Public propertyAutoScrollDuration
Duration of auto scroll in seconds. The default value is 0.25.
Public propertyAutoScrollLabel
Label that indicates whenever automatical scroll is switched on or off. The default value is null. This label takes effect in 2D mode only.
Public propertyBackground
Brush that fills the chart's background.
Public propertyCaption
Caption of the chart.
Public propertyCartesianSystem
Cartesian coordinates system used to store value axes and supplementary visual items.
Public propertyDelegate
Chart delegate.
Public propertyDrawIn3D
Flag that determines if a chart should be drawn in 3D (true) or in 2D (false). The default value is false.
Public propertyIncrementalMinMaxMode
Incremental minimum and maximum calculation mode. This mode makes sense in streaming mode only. If the incremental mode is on, new minimum cannot be gearter and new maximum cannot be less than the ones calculated on the previous datasets. The default value is false.
Public propertyInitialPolarAngle
Initial rotation angle of the polar coordinate system in radians (has effect in 2D mode only). The default value is 0 (0 degrees). This is the angle the chart is rotated back to if you call ResetTransformations method.
Public propertyInitialXAngle
Initial rotation angle around the X-Axis (horizontal axis) in radians (has effect in 3D mode only). The default value is -0.87 (-50 degrees). This is the angle the chart is rotated back to if you call ResetTransformations method.
Public propertyInitialYAngle
Initial rotation angle around the Y-Axis (vertical axis) in radians (has effect in 3D mode only). The default value is 3.93 (225 degrees). This is the angle the chart is rotated back to if you call ResetTransformations method.
Public propertyIsTransitionPlaying
Check if transition is playing.
Public propertyLegend
Legend of the chart.
Public propertyLicenseKey
License key of product.
Public propertyMargin
Margin of the chart that determines how far the content of chart starts from view's bounds. The default margin is zero on all sides.
Public propertyMaxZoom
Maximal zoom of the chart.After this zoom is reached by user interactions, chart starts bouncing zoom. The maximal zoom differs in 2D and 3D mode.In 2D mode the default value is recalculated each time the chart is laid out(by changing of the frame or by updating data) according to the data on the axes in case ShouldCalculate2DZoomBoundsAutomatically flag is set to true.In 3D the default value is 2.
Public propertyMinZoom
Minimal zoom of the chart. After this zoom is reached by user interactions, chart starts bouncing zoom. The minimal zoom differs in 2D and 3D mode. In 3D mode the default value is 0.5. In 2D it is 1.
Public propertyPermanentRotationX
Flag determining if permanent rotation around X-Axis is on (true), or off (false). The default value is false. Use this flag if you want the chart to rotate around X-Axis without any interactions. This property takes effect in 3D mode only.
Public propertyPermanentRotationXSpeed
Speed of permanent rotation around X-Axis (in radians per second). The default value is 0. See permanentRotationX for more info about permanent rotation.
Public propertyPermanentRotationY
Flag determining if permanent rotation around Y-Axis is on (true), or off (false). The default value is false. Use this flag if you want the chart to rotate around Y-Axis without any interactions. This property takes effect in 3D mode only.
Public propertyPermanentRotationYSpeed
Speed of permanent rotation around Y-Axis (in radians per second). The default value is 0. See PermanentRotationY for more info about permanent rotation.
Public propertyPivot
Pivot of the chart in the internal chart scene coordinates. Use this property if you want to save and than restore position of the chart. This property works for 2D and 3D modes. Theoretically you can use this property to pan the chart programmatically, however it is better to use ZoomToRegionFrom method of NChartValueAxis.
Public propertyPointSelectionEnabled
Flag determining if the chart points can be selected by tap (true) or not (false). The default value is true. If you do not want to select points by tap, it is better to disable selection, because it will save memory and boost the data updating.
Public propertyPointsHistoryLength
Property that determines the maximal length of series' points array. The default value is 1000. The array of points in series is determined after UpdateData call (by querying points from series' data sources) and then can be extended after ExtendData call. The property PointsHistoryLength takes effect by using ExtendData only. The new points are added to the end of the points' array of the series and if the array exceeds the given length, first n points are deleted, where
n = array.length - pointsHistoryLength
Public propertyPolarAngle
Rotation angle of the polar coordinate system in radians (has effect in 2D mode only).
Public propertyPolarSystem
Polar coordinates system used to store value axes and supplementary visual items.
Public propertyScaleLegends
Scale legends array. It's empty by default.
Public propertySeries
Array of series.
Public propertyShadingModel
Shading model that is used in 3D mode. The default value is NChartShadingModelPhong. This property controls shading for the 3D charts like surfaces, columns, etc. Shading model for point markers is controlled through their brushes. This property takes effect in 3D mode only.
Public propertyShouldAntialias
Flag that determines if the image should be anti-aliased (true) or not (false). Antialiasing makes the picture smoother, but impacts performance. The default value is false.
Public propertyShouldAutoScroll
Flag determining if chart should automatically scroll (true) or not (false) to the end if new data are added by the ExtendData call. The default value is NO. This flag takes effect in 2D mode only.
Public propertyShouldBouncePan
Flag that determines if pan should bounce (true) or not (false). The default value is true.
Public propertyShouldBounceZoom
Flag that determines if zoom should bounce (true) or not (false). The default value is true.
Public propertyShouldCalculate2DZoomBoundsAutomatically
Flag determining if zoom in 2D mode should be calculated automatically (true) or not (false). The default value is true.
Public propertyShouldConvertZoomToAllowed
Flag determining if all zoom should be converted to the allowed zoom modes (true) or not (false). The default value is true. If this flag is true, all the zoom directions are converted to the allowed zoom directions. For example, if only horizontal zoom is allowed, and user zooms in diagonal direction, chart is zoomed horizontally with this flag set to true.
Public propertyShouldToggleAutoScrollByPan
Flag determining if automatical scroll should be automatically toggled by pan (true) or not (false). The default value is false. If this flag is true, automatical scroll is switched on (ShouldAutoScroll is set to true) if user pans to the right-most position of the chart and switched off (ShouldAutoScroll is set to false) if user pans left. This flag takes effect in 2D mode only.
Public propertyShowFPS
Flag that determines if FPS rate should be displayed (true) or not (false). You may use this for debug purposes or if you are just curious, but it's a very bad idea to show FPS in production code, because it results in continuous rendering that loads CPU and consumes power. If FPS is off, the picture is re-rendered only if it's really needed. The default value is false.
Public propertySizeAxis
Size axis used to scale the sizes of markers.
Public propertyStreamingMode
Flag determining if streaming mode is enabled. See StreamData
Public propertyTimeAxis
Time axis used to navigate through the time ticks.
Public propertyUseParallelProjection
Flag that determines if a chart use parallel projection (true) or perspective projection (false) in 3D-mode. The default value is false.
Public propertyUserInteractionMode
Intercation mode used in the chart. The default is NChartUserInteractionAll. You can use multiple interactions concatenated with bitwise OR to specify the mask of what is available.
Public propertyVersionInfo
Get version info.
Public propertyXAngle
Rotation angle around the X-Axis (horizontal axis) in radians (has effect in 3D mode only).
Public propertyYAngle
Rotation angle around the Y-Axis (vertical axis) in radians (has effect in 3D mode only). The default value is 3.93 (225 degrees).
Public propertyZoom
Zoom of the chart. The default zoom is 1 which corresponds to the fitting the chart to screen (both in 2D and 3D). The zooming is proportional. If you want non-proportional zoom in 2D mode, you should use ZoomToRegionFrom method of NChartValueAxis. If you want to alter the initial zoom, you should change the value of this property after UpdateData call.
Public propertyZoomMode
Zoom mode used in chart. The default is NChartZoomMode.Proportional.
Public propertyZoomToPointMode
Flag that determines if chart is zoomed to the cursor (true) or to the screen center (false). The default value is false.
Top
Methods
  NameDescription
Public methodAddScaleLegend
Add scale legend.
Public methodAddSeries
Add series to chart.
Public methodAddSeriesSettings
Add global settings for the series. If you previously set some settings, they will be overwritten by new ones.
Public methodAlignCenter
Change position so that the chart is aligned to the center of the screen. This method takes effect in 3D mode only.
Public methodBeginTransaction
Begin data chnaging transaction. You should call this method before any changes of chart settings/data in separate thread. After the changes are made, you should call EndTransaction. The typical use-case of multithreading in NChart3D is the streaming - the realtime data updating. There is no sense to call this method in main thread.
Public methodClose
Public methodEndTransaction
End data changing transaction. See also BeginTransaction.
Public methodEquals (Inherited from Object.)
Public methodExtendData
Force chart to extend the points arrays of series. Only newly added data are processed by this call. Minimums and maximums may change. Call this method always you want to extend the data array without changing old data.This method causes series to query new portion of data through ExtraPoints(NChartSeries^ series) call of their data sources.But you cannot extend the array of points forever, so there is a property PointsHistoryLength that determines the length of history. The difference with UpdateData() is that only newly added points are processed and the array of these points is queried through ExtraPoints(NChartSeries^ series) call of NChartSeriesDataSource.This can save you time by updating large data sets.
Public methodFitToScreen
Change zoom and position so that the chart fits the screen (with current rotation, if in 3D).
Public methodFlushChanges
Synchronize all the changes with visual appearance. You may call this method after all your data is updated (it means after you called updateData and PlayTransition because PlayTransition only says that transition should start playing and does not wait till it plays completely) to ensure that the visual appearance will be updated as soon as possible. You may call this method on the big dataset to reduce lag between your updateData call and actual updating.
Public methodGetHashCode (Inherited from Object.)
Public methodGetType (Inherited from Object.)
Public methodPlayTransition
Play animated transition from old state to new one. The old state is cached automatically, so the only thing you need to do for animation is to change the series (by calling AddSeries / RemoveSeries / RemoveAllSeries) or data in the series (by updating data source and calling UpdateData) and than call PlayTransition. State is cached when UpdateData is called.
Public methodRebuildSeries
Force series to rebuild by reloading data from data source. Call this method when you know that the chart layout (including layout of axes, so min and max values) has not changed, but the data in series has. This method invokes UpdateSeries automatically. Data is not processed by this call, so values on axes remain unchanged. Use this method if you are absolutely sure minimums and maximums have not changed!
Public methodRelayout
Force chart to relayout. Call this method if you made some changes but do not want to update data. A call of UpdateData invokes relayout automatically.
Public methodRemoveAllScaleLegends
Remove all scale legends.
Public methodRemoveAllSeries
Remove all series from chart.
Public methodRemoveAllSeriesSettings
Remove all the global settings for the series.
Public methodRemoveScaleLegend
Remove scale legend.
Public methodRemoveSeries
Remove series from chart.
Public methodRemoveSeriesSettings
Remove all the global settings for the series by given type.
Public methodResetTransformations
Reset all transformations to initial values.
Public methodResetTransition
Reset transition by cleaning up the cache made from the previous UpdateData call. Call this method if you want to see animation from the default start positions as if you just started the app.
Public methodRotateAroundXToAngle(Single, Single, Single)
Rotate chart around the X-Axis (horizontal axis) with animation (has effect in 3D mode only).
Public methodRotateAroundXToAngle(Single, Single, Single, INChartInterpolator)
Rotate chart around the X-Axis (horizontal axis) with animation (has effect in 3D mode only). See NChartInterpolator for details.
Public methodRotateAroundYToAngle(Single, Single, Single)
Rotate chart around the Y-Axis (vertical axis) with animation (has effect in 3D mode only).
Public methodRotateAroundYToAngle(Single, Single, Single, INChartInterpolator)
Rotate chart around the Y-Axis (vertical axis) with animation (has effect in 3D mode only). See NChartInterpolator for details.
Public methodRotatePolarToAngle(Single, Single, Single)
Rotate polar coordinate system with animation (has effect in 2D mode only).
Public methodRotatePolarToAngle(Single, Single, Single, INChartInterpolator)
Rotate polar coordinate system with animation (has effect in 2D mode only). See NChartInterpolator for details.
Public methodSeriesSettings
Get settings of given settings class. If there were no settings set, default settings container for the given type is returned.
Public methodStopTransition
Stop transition. This will stop all the transition animations, even if they are not played till the end or if they where delayed and did not even start animating.
Public methodStreamData
Stream the data. This causes the updating of chart to display new states of points. The data are going to be processed, so minimum and maximum on the axes may change. Use this method in the following use-case: if your set of points was not changed, but the values in the states of points do, you can update the chart thrugh this method much faster than through regular UpdateData. The difference with RebuildSeries is that StreamData _does not_ reload data from data source, but _does_ the optimized data processing (it's faster than regular data processing). Series will use the points they already have (the points are mutable, so you can change their data anywhere you want). The difference with UpdateSeries is that StreamData is even faster and _does_ the optimized data processing. So use it to reflect some realtime "streaming" changes of data. This method requires StreamingMode to be on, use StreamingMode = true for this. The first appearance of series should be initialized by the UpdateData call. StreamData is to change the already displayed series only.
Public methodToString (Inherited from Object.)
Public methodUpdateData
Force chart to be updated. Call this method when you want to reload data from the data source and rebuild the chart. Data are processed by this call and minimums / maximums on axes are calculated.
Public methodUpdateSeries
Force series to be updated without reloading data from data source. Call this method when you want to reflect some changes you made in the visual appearance of a series (brush, etc.). A call of RebuildSeries invokes UpdateSeries automatically.
Public methodZoomTo
Zoom of the chart. The default zoom is 1 which corresponds to the fitting the chart to screen (both in 2D and 3D). The zooming is proportional. If you want non-proportional zoom in 2D mode, you should use ZoomToRegionFrom method of NChartValueAxis. If you want to alter the initial zoom, you should change the value of this property after UpdateData call.
Top
See Also