-
Notifications
You must be signed in to change notification settings - Fork 204
/
Funnel.cs
48 lines (44 loc) · 1.53 KB
/
Funnel.cs
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using Android.App;
using Android.Content;
using Android.OS;
using Android.Runtime;
using Android.Views;
using Android.Widget;
using Com.Syncfusion.Charts;
using Android.Graphics;
using Com.Syncfusion.Charts.Enums;
namespace SampleBrowser
{
public class Funnel : SamplePage
{
SfChart chart;
public override View GetSampleContent(Context context)
{
chart = new SfChart(context);
chart.Title.Text = "Website Visitors";
chart.Title.TextSize = 15;
chart.SetBackgroundColor(Color.White);
chart.Legend.Visibility = Visibility.Visible;
chart.Legend.ToggleSeriesVisibility = true;
chart.Legend.IconHeight = 14;
chart.Legend.IconWidth = 14;
FunnelSeries funnelSeries = new FunnelSeries();
funnelSeries.ItemsSource = MainPage.GetFunnelData();
funnelSeries.XBindingPath = "XValue";
funnelSeries.YBindingPath = "YValue";
funnelSeries.DataMarker.ShowLabel = true;
funnelSeries.DataMarker.LabelStyle.LabelFormat = "#.#'%'";
funnelSeries.DataMarker.LabelStyle.BackgroundColor = Color.Transparent;
funnelSeries.DataMarker.LabelStyle.TextColor = Color.White;
funnelSeries.StrokeWidth = 1;
funnelSeries.StrokeColor = Color.White;
funnelSeries.ColorModel.ColorPalette = ChartColorPalette.Natural;
chart.Series.Add(funnelSeries);
return chart;
}
}
}