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

How to have points with differents colors depending of the value (y)? #3950

Closed
Phil353556 opened this issue Feb 16, 2025 · 2 comments
Closed
Labels

Comments

@Phil353556
Copy link

Hello,

see graph below,
I don't know it is possible, (I saw the graph with bicycle 👍 ) I would like to have points with differents colors;
Example :
y = 1 : point in blue color
y = 2 : point in orange color
y = 3 : point in red color
y = 4 : and so on
Image

other question, x axis is all the day of one year.
is it possible to :
point from 1 to 31 , write only one word january
point from 32 to 60, write only one february
and so on

Many Thanks
Phil

@netil
Copy link
Member

netil commented Feb 18, 2025

@Phil353556, you need to customize by your own. I made an example as a reference for your needs.

other question, x axis is all the day of one year.

If want to display month name in a sequential x Axis value,
try by approaching as,

  axis: {
    x: {
      tick: {
        values: [15, 44, ...],  // take the middle value for each month's range.
        format: function(x) {
          return {15: "January", 44: "February", ...}[x];
         }
      }
    }

@Phil353556
Copy link
Author

@netil you're the best, really.
Many thanks, I have to play a little now. But clearly you give me an incredible solution.
Phil

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

2 participants