sibvisions / flutter_jvx

A generic Flutter app for JVx applications.
Apache License 2.0
3 stars 1 forks source link

Chart improvements #203

Open rjahn opened 1 year ago

rjahn commented 1 year ago

Pie chart:

If you have long labels, the labels are inside the chart and overlap other areas in the chart. With short labels it looks better but only as long as the segment is big enough.

Same in chart legend. Label too long, overlaps other labels.

We could try if there's a feature in the chart library to move labels outside the chart and shorten the legend or set clipping areas?

If we can't fix it with existing API: open an issue for the chart library

ToniHeiss commented 1 year ago

Example for the pie chart.

grafik

ToniHeiss commented 1 year ago

Affects new charts implemented by #169

ToniHeiss commented 11 months ago

There does not seem to be a solution for the labels in pie charts with this library.

ToniHeiss commented 11 months ago

Current open issues: https://github.com/entronad/graphic/issues/275 https://github.com/entronad/graphic/issues/259

rjahn commented 11 months ago

labels outside the chart are working with rose chart, but I guess this chart type is a special solution?

ToniHeiss commented 11 months ago

grafik would look like this then, would not be a pie chart anymore.

rjahn commented 11 months ago

It was just an input that this chart type shows labels outside

ToniHeiss commented 11 months ago

Yeah, the chart seems to do that automatically. PieCharts have the label inside them and RoseCharts have them outside. There is a way to offset them into one direction, but this either affects ALL labels, so i can shift all labels down, right, up, left, or i calculate an individual offset for each label. That would be a possibility, but I have not yet found an exact way. I would first have to calculate the current position of the label myself with just the value and then calculate a necessary offset. Even if that is solved, a new problem arises then that we can't know if the label is then so much "offset" that it is actually now outside the whole layout area of the chart itself.

It just does not seem that feasable at the moment.

ToniHeiss commented 11 months ago

PieChart selection ticket: https://github.com/entronad/graphic/issues/276

Currently only possible to select the line in the middle between elements.

entronad commented 1 month ago

The pie label issue solution is here:

https://github.com/entronad/graphic/issues/275#issuecomment-2412696892