Exemplo n.º 1
0
        public Pyramid()
        {
            SFChart chart = new SFChart();

            chart.Title.Text     = new NSString("Sales Distribution of Cars by Region");
            chart.Legend.Visible = true;
            ChartViewModel dataModel = new ChartViewModel();

            SFPyramidSeries series = new SFPyramidSeries();

            series.ItemsSource          = dataModel.PyramidData;
            series.XBindingPath         = "XValue";
            series.YBindingPath         = "YValue";
            series.DataMarker.ShowLabel = true;
            series.LegendIcon           = SFChartLegendIcon.Circle;
            chart.Legend.IconWidth      = 14;
            chart.Legend.IconHeight     = 14;
            series.DataMarker.LabelStyle.LabelPosition = SFChartDataMarkerLabelPosition.Inner;
            series.ColorModel.Palette = SFChartColorPalette.Natural;
            chart.Series.Add(series);

            chart.Legend.ToggleSeriesVisibility = true;

            this.AddSubview(chart);
        }
Exemplo n.º 2
0
        public Pyramid()
        {
            SFChart chart = new SFChart();

            chart.Title.Text     = new NSString("Food Comparison Chart");
            chart.Legend.Visible = true;
            ChartViewModel dataModel = new ChartViewModel();

            SFPyramidSeries series = new SFPyramidSeries();

            series.ItemsSource        = dataModel.PyramidData;
            series.XBindingPath       = "XValue";
            series.YBindingPath       = "YValue";
            series.LegendIcon         = SFChartLegendIcon.Circle;
            chart.Legend.IconWidth    = 14;
            chart.Legend.IconHeight   = 14;
            series.ColorModel.Palette = SFChartColorPalette.Natural;
            series.EnableTooltip      = true;
            chart.Series.Add(series);

            chart.Legend.ToggleSeriesVisibility = true;

            var tooltip = new SFChartTooltipBehavior();
            NSNumberFormatter formatter = new NSNumberFormatter();

            formatter.PositiveSuffix = " cal";
            tooltip.LabelFormatter   = formatter;
            chart.AddChartBehavior(tooltip);
            this.AddSubview(chart);
        }
Exemplo n.º 3
0
	public override SFSeries GetSeries (SFChart chart, nint index)
	{
		SFPyramidSeries series			= new SFPyramidSeries ();
		return series;
	}
Exemplo n.º 4
0
    public override SFSeries GetSeries(SFChart chart, nint index)
    {
        SFPyramidSeries series = new SFPyramidSeries();

        return(series);
    }