-
-
Notifications
You must be signed in to change notification settings - Fork 1.8k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Radar Chart: No rotated titles #883
Comments
Hi. |
That would be great! Our project would potentially need this in roughly 2 months (assuming we're using radar charts, the feature is still in the planning phase). If we end up needing this feature and it isn't there yet, are you open to PRs? |
We are always open to PRs. |
Thanks for this wonderful package. |
Hello everyone, I'm taking a look on this but I'm not sure of what should be the default behavior :
@imaNNeoFighT which one do you prefer ? |
Hi @FlorianArnould. Thanks for writing your propositions. RadarChart(
RadarChartData(
...,
getTitle: (int index, double angle) {
/// angle is something like (360.0 / 6) * index which is provided by the library.
/// Now we can manipulate the angle, for example, we can find the tangent angle to show rotated titles, or we can pass always 0 to have a horizontal title.
return RadarChartTitle(text: titles[index] ?? '', angle: angle);
},
),
) |
Hi again @imaNNeoFighT, canvasWrapper.translate(featureOffset.dx, featureOffset.dy);
canvasWrapper.drawText(
_titleTextPaint,
Offset.zero -
Offset(_titleTextPaint.width / 2, _titleTextPaint.height / 2),
title.angle,
);
canvasWrapper.restore(); |
You need to remove |
Thanks I will take this piece of code then 😉 |
This feature has just landed in 0.55.0. |
Is your feature request relasted to a problem? Please describe.
The bottom titles of the radar chart are hard to read since they're upside down.
Describe the solution you'd like
I'd like display custom widgets as titles. This would be cool:
That way we could also add icons above the titles and rotate them ourselves if needed by calculating 360/index.
Describe alternatives you've considered
Alternative charts could be used, but at the cost of custom code or more dependencies.
Additional context
Add any other context or screenshots about the feature request here.
The text was updated successfully, but these errors were encountered: