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. (Last updated on: November 16, 2018).
Unfortunately, activation email could not send to your email. Please try again.
Syncfusion Feedback

ColumnSeries Chart disappear after showing the tooltip with the column value

Thread ID:

Created:

Updated:

Platform:

Replies:

123188 Feb 24,2016 05:30 PM UTC Feb 25,2016 10:05 AM UTC Xamarin.Android 3
loading
Tags: SfChart
Ramón Esteban
Asked On February 24, 2016 05:30 PM UTC

Hi,

I don't know why but setting the ToolTip enable for my column data is causing the entire chart to disappear. Here's my code to load the Chart Columns:

In my Fragment:

var chartService = Mvx.Resolve<IChartService> ();

frame_basket = view.FindViewById<FrameLayout> (Resource.Id.frame_basket);
frame_basket.AddView(chartService.GetBasketSizeColumnChart(this.Activity, IndicatorsVm.BarsData.ElementAt(0)));
  

The GetBasketSizeColumnChart function is defined:

#region GetBasketSizeColumnChart

        public View GetBasketSizeColumnChart (Context context, CurrentMonthIndicator indicator)
        {
            SfChart chart = new SfChart(context);
            chart.SetBackgroundColor(Color.White);

            chart.Legend.Visibility = Visibility.Visible;
            chart.Legend.ToggleSeriesVisibility = true;
            chart.Legend.DockPosition = ChartDock.Bottom;

            CategoryAxis categoryaxis = new CategoryAxis();
            categoryaxis.LabelPlacement = LabelPlacement.BetweenTicks;
            categoryaxis.Title.Text = indicator.Name;
            chart.PrimaryAxis = categoryaxis;


            // Calculate the numerical axis
            var max = System.Math.Max(indicator.RealValue, indicator.TargetValue);

            NumericalAxis numericalaxis = this.GetNumericalAxis (max);
            chart.SecondaryAxis = numericalaxis;

            // Real data
            ColumnSeries columnSeries1 = new ColumnSeries();
            columnSeries1.Label = context.Resources.GetString(Resource.String.sales_indicators_real);
            columnSeries1.LegendIcon = ChartLegendIcon.Rectangle;

            var dataReal = new ObservableArrayList();
            dataReal.Add(new ChartDataPoint(context.Resources.GetString(Resource.String.sales_indicators_real), (double)indicator.RealValue));
            columnSeries1.DataSource = dataReal;


            // Target Data
            ColumnSeries columnSeries2 = new ColumnSeries();
            columnSeries2.Label = context.Resources.GetString(Resource.String.sales_indicators_target);
            columnSeries2.LegendIcon = ChartLegendIcon.Rectangle;

            var dataTarget = new ObservableArrayList();
            dataTarget.Add(new ChartDataPoint(context.Resources.GetString(Resource.String.sales_indicators_target), (double)indicator.TargetValue));
            columnSeries2.DataSource = dataTarget;

            chart.Series.Add(columnSeries1);
            chart.Series.Add(columnSeries2);

            columnSeries1.TooltipEnabled = true;
            columnSeries2.TooltipEnabled = true;

            return chart;
        }

        #endregion
 

Once the animation of the tooltip finished the chart is reloaded somehow with no data.
Am I doing something wrong?

I have attached couple of images with the results.



Attachment: Archive_33fda386.zip

Mohamed Samsudeen K S [Syncfusion]
Replied On February 25, 2016 10:05 AM UTC

Hi Ramón,

We are unable to reproduce the issue with the provided details. We have created a sample and attached for your reference.

SimpleSample 

If the issue still persists, then please provide us the modified sample to validate the issue.

Regards,
Samsudeen K S


Mohamed Samsudeen K S [Syncfusion]
Replied On February 25, 2016 10:05 AM UTC

Hi Ramón,

We are unable to reproduce the issue with the provided details. We have created a sample and attached for your reference.

SimpleSample 

If the issue still persists, then please provide us the modified sample to validate the issue.

Regards,
Samsudeen K S


Mohamed Samsudeen K S [Syncfusion]
Replied On February 25, 2016 10:05 AM UTC

Hi Ramón,

We are unable to reproduce the issue with the provided details. We have created a sample and attached for your reference.

SimpleSample 

If the issue still persists, then please provide us the modified sample to validate the issue.

Regards,
Samsudeen K S


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.

Warning Icon 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.Close Icon

;