You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
The following example shows how to create a custom 'Moving Average' indicator.
1
+
<!-- default badges list -->
2
+
Automatically generated badges
3
+
<!-- default badges end -->
4
+
5
+
# Dashboard for ASP.NET Core - Custom Trend Indicator
6
+
7
+
The following example shows how to create a custom “Moving Average” indicator:
8
+
9
+

10
+
11
+
1. Create a [ChartCustomIndicator](https://docs.devexpress.com/Dashboard/DevExpress.DashboardCommon.ChartCustomIndicator) descendant (the `MovingIndicator` class in this example). `MovingIndicator` accepts a collection of data points, evaluates the values, and returns the resulting points. These points are used to draw the indicator.
12
+
13
+
2. Register the `MovingIndicator` type in [IndicatorFactory](https://docs.devexpress.com/Dashboard/DevExpress.DashboardCommon.IndicatorFactory) to make this type available as an indicator type. Call the [Register](https://docs.devexpress.com/Dashboard/DevExpress.DashboardCommon.IndicatorFactory.Register--1(System.String)) method in your application before you save and load a dashboard to serialize and deserialize the indicator within the dashboard XML.
14
+
15
+
4. Register [ChartIndicatorsExtension](https://docs.devexpress.com/Dashboard/js-DevExpress.Dashboard.Designer.ChartIndicatorsExtension) before the control is rendered to add the `MovingIndicator` type to the Trend Indicators editor.
16
+
17
+
3. Create an instance of `MovingIndicator` and specify indicator settings.
18
+
19
+
4. After you launch the application, open the Trend Indicators editor and add a new trend indicator of the "Moving Average" type.
0 commit comments