Open brett-estabrook opened 3 years ago
How do we handle chart labels that are outside the chart bounds (Should we just anchor it to the top)?
The dots for point charts (and line charts), can be clipped on the edges. Should we allow this or move the points inbounds, or extend the clip rect by the radius. If we extend the cliprect then the chart could overlap the labels underneath.
Lines near the edge have problems as well.
The main goal it's to use it as part of the PinchToZoom right ? I don't fing another use case for that functionnality, do you have one ?
If the only use case is the PinchToZoom i think we can let the label/point/line generation like this, as a first approach of the functionnality. As the generation of label will be more tricky. I don't like the idea of the chart will be drawn over the other objects (even if it's only some pixels). What do you think @eman1986 ?
For the Y axis, can you show me the problematic result ? It's the only part that (for me) must be update as it's a "mandatory" function for users to allow more readability of charts.
The main goal it's to use it as part of the PinchToZoom right ?
Yes
I don't fing another use case for that functionnality, do you have one ?
One minor one, is when the MaxValue of the data points is high and the user wants to Set the MaxValue of the chart less than the Max Value of the data and see only a subset of the chart. This is like pinch to zoom, but doesn't necessarily require it.
For the Y axis, can you show me the problematic result
Look at the top most Y axis value in the upper left. It technically draws outside the chart bounds. The horizontal line is the upper most value of the chart bounds.
Look at the Y axis value in the lower left. It has the same problem.
My thought is to allow the chart to draw outside the bounds by half the value of the height of a y axis label. @Seuleuzeuh do you think that would work?
Yes I think that should work !
Currently, you cannot set the Min/Max values of the chart to be more constrained than the Min/Max values of the dataset. If I modify the code to force this, it will draw the chart outside the bounds of the chart area (Covering up the legend, axes, and labels).
The correct behavior would be to set the ClipRect to the Chart Area on the Skia Sharp Canvas when drawing the AxisBasedCharts. This will caused points drawn out of bounds to simply be Culled by the graphics library.
Some Scratch work
Video of Progress: https://github.com/microcharts-dotnet/Microcharts/issues/296#issuecomment-948185762
Todo Items: