Esempio n. 1
0
        public Candle()
        {
            SFChart chart = new SFChart();

            chart.Title.Text = new NSString("Foreign Exchange Rate Analysis");
            SFDateTimeAxis primary = new SFDateTimeAxis();

            primary.Title.Text             = new NSString("Date");
            primary.LabelRotationAngle     = -45;
            chart.PrimaryAxis              = primary;
            chart.SecondaryAxis            = new SFNumericalAxis();
            chart.SecondaryAxis.Title.Text = new NSString("Price in Dollar");
            chart.SecondaryAxis.Minimum    = new NSNumber(0);
            chart.SecondaryAxis.Maximum    = new NSNumber(250);
            chart.SecondaryAxis.Interval   = new NSNumber(50);
            chart.Delegate = new ChartDollarDelegate();
            ChartViewModel dataModel = new ChartViewModel();

            SFCandleSeries series = new SFCandleSeries();

            series.ItemsSource     = dataModel.FinancialData;
            series.XBindingPath    = "XValue";
            series.High            = "High";
            series.Low             = "Low";
            series.Open            = "Open";
            series.Close           = "Close";
            series.EnableTooltip   = true;
            series.BorderWidth     = 1;
            series.EnableAnimation = true;
            chart.Series.Add(series);
            chart.AddChartBehavior(new SFChartZoomPanBehavior());
            series.ColorModel.Palette = SFChartColorPalette.Natural;
            this.AddSubview(chart);
        }
Esempio n. 2
0
        public override SFSeries GetSeries(SFChart chart, nint index)
        {
            SFCandleSeries series = new SFCandleSeries();

            series.BorderWidth = 1;
            return(series);
        }
Esempio n. 3
0
		public override SFSeries GetSeries (SFChart chart, nint index)
		{
			SFCandleSeries series		= new SFCandleSeries ();
			series.BorderWidth = 1;
			return series;
		}