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

Add lines to diagram

Thread ID:

Created:

Updated:

Platform:

Replies:

119053 May 6,2015 07:41 PM UTC May 9,2015 06:20 AM UTC Xamarin.Forms 5
loading
Tags: SfChart
Jan Malte Dittmer
Asked On May 6, 2015 07:41 PM UTC

Hi,

is it possible to add (thick) horizontal or vertical lines to a chart? I don't mean the grid that is already present but a thicker line to maybe visually separate parts of the chart.

Best,
Jan Malte

Yuvaraj Palanisamy [Syncfusion]
Replied On May 7, 2015 12:25 PM UTC


Hi Jan Malte,
Thanks for using Syncfusion Products,
We would like to let you know that we can achieve your requirement using LineSeries with two data points. We have also prepared a sample for your reference, please find the sample from the following link,
Sample : http://www.syncfusion.com/downloads/support/forum/119053/StripLine373322043.zip
(Note: In future we will provide StripLines feature to achieve this requirement in a simple manner)
Please let us know if you require further assistance on this.
Thanks,
Yuvaraj P

Jan Malte Dittmer
Replied On May 7, 2015 01:14 PM UTC

Hi Yuvaraj,

thank you for pointing me in the right direction again!
Do you know already the date when the new feature goes live?

Best,
Jan Malte

Yuvaraj Palanisamy [Syncfusion]
Replied On May 8, 2015 04:50 AM UTC

Hi Jan,

We would like to let you know that new features will be available in our upcoming main release Volume 2, 2015 release which is scheduled to release in end of June 2015.

Please let us know if you require further assistance on this.

Thanks,
Yuvaraj P

Jan Malte Dittmer
Replied On May 8, 2015 07:19 PM UTC

Hi Yuvaraj,

when I try your example everything works fine but when I try to use this in my project I get a "can't cast from source to target" exception.
My code looks like this:

NumericalAxis xAxis = new NumericalAxis
{
Title = new ChartAxisTitle{ Text = "Fortschritt" },
MajorTickStyle = new ChartAxisTickStyle{ TickSize = 0 },
EdgeLabelsDrawingMode = EdgeLabelsDrawingMode.Shift,
Interval = 1,
Minimum = 0,
Maximum = 9
};
xAxis.LabelCreated += onLabelCreated;

NumericalAxis yAxis = new NumericalAxis 
{
Title = new ChartAxisTitle{ Text = "Erinnerung" },
//LabelStyle = new ChartAxisLabelStyle{ TextColor = Color.White },
MajorTickStyle = new ChartAxisTickStyle{ TickSize = 0 },
Interval = 1,
Minimum = 0,
Maximum = 8
};

diagram.PrimaryAxis = xAxis;
diagram.SecondaryAxis = yAxis;

var lineData = new ObservableCollection<ChartDataPoint>
{
new ChartDataPoint(0, 5),
new ChartDataPoint(8, 5)
};

LineSeries lineSeries = new LineSeries
{
ItemsSource = lineData,
StrokeWidth = 5,
Color = Color.Blue
};

diagram.Series.Add(lineSeries);

Without the LineSeries everything works.

Yuvaraj Palanisamy [Syncfusion]
Replied On May 9, 2015 06:20 AM UTC

Hi Jan,

We have created the sample using your code, but the sample working fine without any issue. Please check the attached sample from the following location. If you still face the problem, please revert us by modifying the sample based on your application along with replication procedure. This would be helpful for us to serve you better.

Sample : http://www.syncfusion.com/downloads/support/forum/119053/StripLine-1982869422.zip

Please let us know if you have any queries.

Thanks,
Yuvaraj P

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

;