SciChart® the market leader in Fast WPF Charts, WPF 3D Charts, and iOS Chart & Android Chart Components
Please use the forums below to ask questions about SciChart. Take a moment to read our Question asking guidelines on how to ask a good question and our support policy. We also have a tag=SciChart on Stackoverflow.com where you can earn rep for your questions!
Please note: SciChart team will only answer questions from customers with active support subscriptions. Expired support questions will be ignored. If your support status shows incorrectly, contact us and we will be glad to help.
I am working with drawing text in InternalDraw of FastLineRenderableSeries method.
I have got two questions:
1) When I am changing FontSize dynamically, I get this picture (img 1). How can I fix this problem? P.S. this problem starts to appear when I display two or more renderable series.
2) Is there any method or simple way to get all visible points from FastLineRenderableSeries?
Thanks in advance
The RenderContext.DrawText method is not super well defined. It requires a bounding rect which constains (and scales) the text. We use it internally to draw text within cells or columns and scale or hide text that is smaller than the bounding rect. So, if you want a larger font, you have to also change the bounding rect.
I can ask the team if we can add an overload to DrawText with FontSize and not be bounded by the rectangle
Regarding all visiblepoints from RenderableSeries, you can do this:
var visibleRange = renderSeries.XAxis.VisibleRange; // then simple int lowIndex = renderSeries.DataSeries.FindIndex(visibleRange.Min, SearchMode.Nearest); int highIndex = renderSeries.DataSeries.FindIndex(visibleRange.Max, SearchMode.Nearest);
This will return the indices to the data in the viewport (it will make the assumption that data is sorted in X direction).
Please login first to submit.