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

feat: series style [Issue-116] #118

Merged
merged 3 commits into from
May 11, 2023
Merged

feat: series style [Issue-116] #118

merged 3 commits into from
May 11, 2023

Conversation

hkang1
Copy link
Owner

@hkang1 hkang1 commented May 11, 2023

Add support for overriding individual data series with a specific line style.

NOTE: out-of-filter-range (grey typically), NaN, -Inf, and +Inf styles will still supersede the series colors. This is the same behavior for the default series color.

Sample config for a chart that is rendering 10 lines.

const config = { 
  style: {
    data: {
      series: [
        undefined,
        { lineWidth: 2, strokeStyle: 'rgba(255, 0, 0, 1.0)' },
        undefined,
        { lineWidth: 2, strokeStyle: 'rgba(0, 255, 0, 1.0)' },
        undefined,
        { lineWidth: 2, strokeStyle: 'rgba(255, 150, 0, 1.0)' },
      ],
    },
  },
};

first series = default
2nd = red
3rd = default
4th = green
5th = default
6th = orange
all other = default

Screen Shot 2023-05-11 at 10 33 29 AM

@netlify
Copy link

netlify bot commented May 11, 2023

Deploy Preview for bejewelled-lamington-f97ebd ready!

Name Link
🔨 Latest commit 8204203
🔍 Latest deploy log https://app.netlify.com/sites/bejewelled-lamington-f97ebd/deploys/645d19241fb94300088ed075
😎 Deploy Preview https://deploy-preview-118--bejewelled-lamington-f97ebd.netlify.app
📱 Preview on mobile
Toggle QR Code...

QR Code

Use your smartphone camera to open QR code link.

To edit notification comments on pull requests, go to your Netlify site settings.

@hkang1 hkang1 merged commit 7c474ab into main May 11, 2023
@hkang1 hkang1 deleted the 116-series-style branch May 11, 2023 16:37
@hkang1 hkang1 linked an issue May 11, 2023 that may be closed by this pull request
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

add support for series specific style override
1 participant