Skip to content

Circular radar chart with labels #3082

Description

@damienmoulard

Hi,

Not really an issue but more of a little new feature: I needed to have a circular radar chart but with labels outside the chart like the regular radar chart (see the result below), and I couldn't find a way to do this with the available options.

capture d ecran 2016-08-03 a 15 53 57
Expected result

After taking a look into the code I figured that it couldn't be done when the parameter scale.lineArc is true... this being the parameter that sets the chart circular :(

To fix this I added a new boolean parameter so I can pass the condition when scale.lineArc is true, scale.lineArcWithLabels, and changed a bit the code in LinearRadialScale.draw by replacing:

if (!opts.lineArc) {
[...]
}

with:

if (!opts.lineArc || opts.lineArcWithLabels) {
[...]
}

It was enough for me, there is maybe a cleaner way to do this but I didn't dive much more than that into the code. Just suggesting a new feature here since I needed it!

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

      Milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions