InteractiveMode: ChartInteractiveMode;
InteractiveMode: Prognoz.Platform.Interop.Chart.ChartInteractiveMode;
The InteractiveMode property determines an interactive mode.
By default the Selection mode is used: that is, the mode of chart objects selection.
To execute this example, create a form, add the following items on this form: a button named Button1, ChartBox component named ChartBox1, UiChart component named UiChart1, specify UiChart1 as a source of the ChartBox component, define values of the PointCount and SerieCount properties for the UiChart component, and add references to system assemblies Chart and MathFin in the module 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 Button1 sets the interactive mode EditByPoint, and the series with the index 0 is selected for editing.
To execute this example, create a .NET form, and add the following components on this form: a button named Button1, the ChartBoxNet component named ChartBoxNet1, the uiChartNet component named UiChartNet1, specify UiChartNet1 as a source of the ChartBoxNet component, and add references to system assemblies Chart and MathFin in the module 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 Button1 sets the interactive mode EditByPoint, and the series with the index 0 is selected for editing.
See also: