Skip to content
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

XYChart not allowing legends #5292

Open
jgclark opened this issue Feb 16, 2024 · 4 comments
Open

XYChart not allowing legends #5292

jgclark opened this issue Feb 16, 2024 · 4 comments
Labels
Status: Triage Needs to be verified, categorized, etc Type: Bug / Error Something isn't working or is incorrect

Comments

@jgclark
Copy link

jgclark commented Feb 16, 2024

Description

[Doesn't quite fit any of the issue categories; this is more a suggestion than a bug.]
According to the documentation the excellent new XYChart doesn't have a way of showing series labels or legend. However the initial proposals for such a chart type did include such labels, and all graphing packages include this option.

Steps to reproduce

n/a

Screenshots

No response

Code Sample

No response

Setup

  • Mermaid version: 10.8.0
  • Browser and Version: n/a

Suggested Solutions

In the same way that a Y axis definition can include a title (y-axis "Revenue (in $)" ...) allow a name after the series name: line "Sales" [...].

Additional Context

No response

@jgclark jgclark added Status: Triage Needs to be verified, categorized, etc Type: Bug / Error Something isn't working or is incorrect labels Feb 16, 2024
@AzzoliniDavide
Copy link

it would be awesome to have this possibility, whatever the syntax according to feasibility.

@masklinn
Copy link

Would be super useful due to mermaid being essentially the only way to show charts in github's markdown contexts (unless you want to export charts from some other graphing package).

@cpelley
Copy link

cpelley commented Nov 19, 2024

Would be super useful due to mermaid being essentially the only way to show charts in github's markdown contexts (unless you want to export charts from some other graphing package).

In the mean time, I have been doing this for a legend just after the chart:

Legend:

  • something1
  • something2
  • ...

(using https://placehold.co to generate the square colour images)

@jgclark
Copy link
Author

jgclark commented Nov 19, 2024

Would be super useful due to mermaid being essentially the only way to show charts in github's markdown contexts (unless you want to export charts from some other graphing package).

In the mean time, I have been doing this for a legend just after the chart:

Legend:

  • something1
  • something2
  • ...

(using https://placehold.co to generate the square colour images)

Oh, wow, that's smart. I had no idea this was possible.

But definitely a hack we don't want to have to live with for a long time.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Status: Triage Needs to be verified, categorized, etc Type: Bug / Error Something isn't working or is incorrect
Projects
None yet
Development

No branches or pull requests

4 participants