Skip to content

ChartSizeEventArgs

class cAlgo.API

DesktopCLICloud

Provides data for the chart size change event.

Definition

public class ChartSizeEventArgs

Namespace: cAlgo.API · Group: EventArgs

Examples

using cAlgo.API;

namespace cAlgo
{
    // This example shows how to use the Chart ChartSizeEventArgs
    public partial class ChartSizeEventArgsSample : Indicator
    {
        protected override void Initialize()
        {
            Chart.SizeChanged += Chart_SizeChanged;
        }

        private void Chart_SizeChanged(ChartSizeEventArgs obj)
        {
            Chart.DrawStaticText("size", "Size Changed", VerticalAlignment.Top, HorizontalAlignment.Right, Color.Red);
        }

        public override void Calculate(int index)
        {
        }
    }
}
import clr
clr.AddReference("cAlgo.API")

from cAlgo.API import *

class Test():
    def initialize(self):
        api.Chart.SizeChanged += self.on_chart_size_changed

    def on_chart_size_changed(self, args):
        api.Chart.DrawStaticText("size", "Size Changed", VerticalAlignment.Top, HorizontalAlignment.Right, Color.Red)
{
  "AccessRights": "None",
  "TimeZone": "UTC",
  "IsOverlay": true
}

Properties

Name Description
AreaDesktopCLICloudChartArea Gets the chart area.
ChartDesktopCLICloudChart Gets the chart.