Hi,I have a fixed vertical line that I called "focusLine". "layout" is the x:name of the AbsoluteLayout in XAML.
var focusLine = new BoxView { Color = Color.Black }; layout.Children.Add(focusLine,new Rectangle(0.5, 0, 1, 1),AbsoluteLayoutFlags.PositionProportional|AbsoluteLayoutFlags.HeightProportional);
I set the x position of new Rectangle to 0.5 that means vertical line appears in the middle of the AbsoluteLayout. Instead, I want to set the x position aligned with the center of the charts. See attachment please.
May you help me please?
Hello Joseph,
Thank you for contacting Infragistics. Our Xamarin charts do not expose value overlays and is considered a new product idea for this platform.
You can suggest new product ideas for future versions by emailing ideas@infragistics.com.
Submitting your idea will send it directly to our product management team so that it can be imported into our new ideas community once live: http://ideas.infragistics.com.
Remember when submitting your idea to explain the context in which a feature would be used and why it is needed as well as anything that would prevent you from accomplishing this today. You can even add screenshots to build a stronger case. You can also link back to this thread for additional details.Thank you in advance to submitting your product idea.
I recommend following the examples in stack overflow or Xamarin's website.
eg.
// sl is a StackLayout sl.Children.Add(new BoxView() { Color = Color.Black, WidthRequest = 2, HeightRequest = 100 });
Let me know if you have any questions.
Sincerely,
Michael Di FilippoAssociate Software DeveloperInfragistics, Inc.www.infragistics.com/support
Hi Michael, thank you for your support but I know how to draw a vertical line. I need to know if there is any workaround to draw a vertical line in the center position of a Xam Data Chart. I need to highlight the center x value between minimum and maximum visible value in the chart.If I can't use a vertical line, what can you suggest to highlight always the center value on xAxis between MinimumVisibleValue and MaximumVisibleValue?Also, I'm trying to use CrosshairLayer.
var crosshairLayerSeries = new CrosshairLayer(); crosshairLayerSeries.CursorPosition = new Point(0.5, 0);crosshairLayerSeries.HorizontalLineVisibility = Infragistics.Core.Visibility.Collapsed;MyChart.Series.Add(crosshairLayerSeries);
but the crosshair moves with the chart (panning and zooming), I would it is fixed.
Any suggestions are appreciated.
Thank you for following up. The CursorPosition is one approach and would need to be updated if the chart pans or zooms based on the updated min a max values. If a crosshair layer isn't sufficient then I recommend using another series, like a single line series, for each chart, which is based on the calculation of the minimum and maximum of the data your representing.
Both of these approaches have been untested and still recommend submitting a new product idea if you have not already done so.