We use cookies to give you the best experience on our website. If you continue to browse, then you agree to our privacy policy and cookie policy.
Unfortunately, activation email could not send to your email. Please try again.

SfChart, label, image datamarker

Thread ID:

Created:

Updated:

Platform:

Replies:

126052 Sep 20,2016 03:59 PM Sep 21,2016 11:12 AM Xamarin.Forms 1
loading
Tags: SfChart
Geoffrey
Asked On September 20, 2016 03:59 PM

Hello,

I attached two files.
- One contains the result I want to my android SfChart
- The second is the actual rendering


How to modify the current code to have this rendering ?

I use the following code :

SfChart chart = new SfChart(Activity);
            chart.VerticalScrollBarEnabled = false;
            chart.HorizontalScrollBarEnabled = false;

            CategoryAxis primaryAxis = new CategoryAxis();
            primaryAxis.Visibility = Visibility.Gone;
            primaryAxis.StripLines.Clear();
            primaryAxis.ShowMajorGridLines = false;
            chart.PrimaryAxis = primaryAxis;

            NumericalAxis secondaryAxis = new NumericalAxis();
            secondaryAxis.Visibility = Visibility.Gone;
            secondaryAxis.StripLines.Clear();
            secondaryAxis.ShowMajorGridLines = false;
            chart.SecondaryAxis = secondaryAxis;

            List<Integer> colors = new List<Integer>();
            ObservableArrayList data = new ObservableArrayList();
            foreach (ParticipantViewModel participantViewModel in this._participants.Where(x => x.Difference != 0))
            {
                data.Add(new ChartDataPoint(participantViewModel.Name, participantViewModel.Difference));
                if (participantViewModel.Difference > 0)
                    colors.Add(new Integer(new Color(Constants.ColorPositiveR, Constants.ColorPositiveG, Constants.ColorPositiveB)));
                else
                    colors.Add(new Integer(new Color(Constants.ColorNegativeR, Constants.ColorNegativeG, Constants.ColorNegativeB)));
            }

            ColumnSeries series1 = new ColumnSeries()
            {
                DataSource = data,
                TooltipEnabled = true,
                AnimationEnabled = true,
                AnimationDuration = 0.2,
                Label = "Income"
            };
            series1.ColorModel.ColorPalette = ChartColorPalette.Custom;
            series1.ColorModel.CustomColors = colors;
            series1.DataMarker.MarkerType = DataMarkerType.Ellipse;
            series1.DataMarker.ShowMarker = true;
            series1.DataMarker.ShowLabel = true;
            chart.Series.Add(series1);

Attachment: Pictures_95b48d51.7z

Yuvaraj Palanisamy [Syncfusion]
Replied On September 21, 2016 11:12 AM

Hi Tincani, 
 
We have already logged a feature report for DataMarker Label Template support in Xamarin.Forms and this will be available in our upcoming Volume 3, 2016 release which is estimated to be rolled out by end of September, 2016.  
 
Disclaimer : The date for the feature implementation is tentative and not a commitment on our parts.  
 
Regards, 
Yuvaraj 


CONFIRMATION

This post will be permanently deleted. Are you sure you want to continue?

Sorry, An error occured while processing your request. Please try again later.

You are using an outdated version of Internet Explorer that may not display all features of this and other websites. Upgrade to Internet Explorer 8 or newer for a better experience.

;