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

Question about stack chart opacity #2579

Closed
sergiofigueras opened this issue May 17, 2016 · 4 comments
Closed

Question about stack chart opacity #2579

sergiofigueras opened this issue May 17, 2016 · 4 comments

Comments

@sergiofigueras
Copy link

sergiofigueras commented May 17, 2016

Hello guys,

I'm in a problem with line chart using ChartJS 2. Basically, when I create a stacked linechart with multiple series, it seems that the fill color just is with some kind of opacity that I don't want. I tried to change it several ways but no success yet.

In fact, I would like the blue session in a deep blue as the line is, the green one too, and all the others. But some kind of opacity is being displayed.

Here's my chart config:

vm.totalColours = ["#5AEC7A", "#EB1094", "#CDDC39", "#5A97EC"];
vm.defaultChartOptions = {
            legend : {
                position: 'bottom', display: true
            },
            elements: {
                point : {
                    radius: 5
                }
            },
            scales: {
                xAxes: [{
                    gridLines: {
                        lineWidth: 0,
                        color: "rgba(255,255,255,0)"
                    }
                }],
                yAxes: [{
                    gridLines: {
                        lineWidth: 0,
                        color: "rgba(255,255,255,0)"
                    },
                    "ticks": {
                        "min": 0
                    }
                }]
            }
        };

captura de tela 2016-05-17 as 20 03 26

What should I do to achieve this?

@etimberg
Copy link
Member

@sergiofigueras could you post a fiddle?

@chanonroy
Copy link

Hi there,

If i'm interpreting the problem correctly, I am encountering something similar with stacked line chart opacity.

stacked opacity overlap
https://jsfiddle.net/0fs34ecd/

The first dataset should be light blue in colour, but it's overlapping with the second dataset's redness to form a purplish blue. Maybe this has to do with the way that the datasets are stacked both in front and on top of each other, instead of just stacking on top. Any tips or ideas on a fix?

@etimberg
Copy link
Member

etimberg commented Jun 1, 2016

@chanonroy there is an issue to fix that. the problem is figuring out the best way to do it. Changing the global composite operation to 'source-out' might work, but it might cause problems with the grid lines.

@etimberg
Copy link
Member

Closing as duplicate of #2380

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

No branches or pull requests

4 participants