InteractiveMode: ChartInteractiveMode;
InteractiveMode: Prognoz.Platform.Interop.Chart.ChartInteractiveMode;
The InteractiveMode property determines an interactive mode.
The Selection mode is used by default, that is, the mode of chart objects selection.
To execute the example, create a form, add the following elements to the form: a button named Button1, the ChartBox component named ChartBox1, the UiChart component named UiChart1, specify UiChart1 as a data source of the ChartBox component, determine values of the PointCount and SerieCount properties for the UiChart component, and add links to the Chart and MathFin system assemblies in the unit assembly inspector.
Class OBJ725Form: Form
Button1: Button;
UiChart1: UiChart;
ChartBox1: ChartBox;
Sub UiChart1OnGetDataValue(Sender: Object; Args: IUiChartGetDataValueEventArgs);
Begin
Args.Result := True;
Args.Value := Math.Rand;
End Sub UiChart1OnGetDataValue;
Sub UiChart1OnGetSerieName(Sender: Object; Args: IUiChartSerieNameEventArgs);
Begin
Args.Result := "Series " + Args.SerieIndex.ToString;
End Sub UiChart1OnGetSerieName;
Sub Button1OnClick(Sender: Object; Args: IMouseEventArgs);
Var
Chart: IChart;
Begin
Chart := UiChart1.Chart;
Chart.InteractiveMode := ChartInteractiveMode.EditByPoint;
Chart.EditedSerie := 0;
End Sub Button1OnClick;
End Class OBJ725Form;
Clicking the Button1 button sets the EditByPoint interactive mode, and the series with the 0 index is selected for edit.
To execute the example, create a .NET form, add the following components to the form: a button named Button1, the ChartBoxNet component named ChartBoxNet1, the uiChartNet component named UiChartNet1, specify UiChartNet1 as a data source of the ChartBoxNet component, add links to the Chart and MathFin system assemblies in the unit assembly inspector.
Imports System;
Imports System.Collections.Generic;
Imports System.ComponentModel;
Imports System.Data;
Imports System.Drawing;
Imports System.Text;
Imports System.Windows.Forms;
Imports Prognoz.Platform.Forms.Net;
Imports Prognoz.Platform.Interop.Metabase;
Imports Prognoz.Platform.Interop.Chart;
Imports Prognoz.Platform.Interop.MathFin;
Public Partial Class OBJ736Form: Prognoz.Platform.Forms.Net.ForeNetForm
Public Constructor OBJ736Form();
Begin
InitializeComponent();
End Constructor;
Private Sub uiChartNet1_OnGetDataValue(Sender: System.Object; Args: Prognoz.Platform.Interop.Chart.UiChartGetDataValueEventArgs);
Var
Math: Prognoz.Platform.Interop.MathFin.Math = New MathClass();
Begin
Args.Result := True;
Args.Value := Math.Rand();
End Sub;
Private Sub button1_Click(sender: System.Object; e: System.EventArgs);
Var
Chart: IChart;
Begin
Chart := ChartBoxNet1.CtrlBox.Chart;
Chart.InteractiveMode := ChartInteractiveMode.ciamEditByPoint;
Chart.EditedSerie := 0;
End Sub;
Private Sub OBJ736Form_Shown(sender: System.Object; e: System.EventArgs);
Begin
uiChartNet1.PointCount := 5;
uiChartNet1.SerieCount := 4;
End Sub;
End Class;
Clicking the Button1 button sets the EditByPoint interactive mode, and the series with the 0 index is selected for edit.
See also: