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.