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

Mixed charts (column & line) not working. #4430

Closed
hummelmose opened this issue Apr 24, 2024 · 2 comments
Closed

Mixed charts (column & line) not working. #4430

hummelmose opened this issue Apr 24, 2024 · 2 comments

Comments

@hummelmose
Copy link

Description

I have a mixed chart that have worked for many years. The last few days the line chart has stopped working. It just show the dots, but not the lines between the dots. Line charts alone works, but the mixed chart don't

Steps to Reproduce

` var chart1 = {
chart: {
type: 'line',
group: 'queue',
id: 'chart',
height: screen.height - 400,
animations: {
enabled: false,
animateGradually: {
enabled: false
}
}
},
title: {
text: '24 timer (Opdateret: 24-04-2024 06:49:46)',
align: 'left'
},
stroke: {
width: 2,
curve: 'smooth'
},
markers: {
size: 3
},
grid: {
borderColor: '#e7e7e7',
row: {
colors: ['#f3f3f3', 'transparent'], // takes an array which will be repeated on columns
opacity: 0.5
},
},
colors: ['#003300', '#2699', '#660066', '#990000', '#E8C872', '#FE7A36', '#444444','#888888'],
series: [

                {
                    name: 'FS Time',
                    type: 'column',
                    data: ['3','0','0','0','0','0','1','','','','','','','','','','','','','','','','',''],
                    
                },
                {
                    name: 'FS Sum',
                    type: 'line',
                    data: ['3','3','3','3','3','3','4','','','','','','','','','','','','','','','','','']
                },                   
                {
                    name: 'GKEA Time',
                    type: 'column',
                    data: ['1','0','0','0','0','0','2','','','','','','','','','','','','','','','','','']
                    
                },
                {
                    name: 'GKEA Sum',
                    type: 'line',
                    data: ['1','','','','','','3','','','','','','','','','','','','','','','','','']
                },
                {
                    name: 'OESK Time',
                    type: 'column',
                    data: ['0','0','0','0','0','0','1','','','','','','','','','','','','','','','','','']
                    
                },
                {
                    name: 'OESK Sum',
                    type: 'line',
                    data: ['','','','','','','1','','','','','','','','','','','','','','','','','']
                },
                {
                    name: 'FS kø',
                    type: 'column',
                    data: ['0','0','0','0','0','0','','','','','','','','','','','','','','','','','','']
                },
                {
                    name: 'GKEA kø',
                    type: 'column',
                    data: ['0','0','0','0','0','0','','','','','','','','','','','','','','','','','','']
                }                     
                
            ],                
            xaxis: {
                categories: ['00','01','02','03','04','05','06','07','08','09','10','11','12','13','14','15','16','17','18','19','20','21','22','23'],
                title: {
                    text: 'Tidspunkt',

                }
            },

        }

        var chart = new ApexCharts(document.querySelector("#chart"), chart1);
        chart.render();
        chart.hideSeries('FS kø');
        chart.hideSeries('GKEA kø');

`

Expected Behavior

Line charts with connected dots

Actual Behavior

only dots

Screenshots

image

Reproduction Link

@hummelmose hummelmose added the bug Something isn't working label Apr 24, 2024
@RocketerJames
Copy link

Hi @hummelmose,

I managed to sort my issue however I did look at yours for you:

Only one of your series is connected 'FS Sum' which is the second series. Every other lines have breaks. Two things are incorrect here: The colours array you supplied has an invalid colour assigned to that series (#2699) but also, the gaps should be null not blank strings (''). Changing that plots the lines.

Hope that helps!

@hummelmose
Copy link
Author

Hi @hummelmose,

I managed to sort my issue however I did look at yours for you:

Only one of your series is connected 'FS Sum' which is the second series. Every other lines have breaks. Two things are incorrect here: The colours array you supplied has an invalid colour assigned to that series (#2699) but also, the gaps should be null not blank strings (''). Changing that plots the lines.

Hope that helps!

The wrong colorcode was an paste issue to Github. It's correct. I changed my code and removed two series, and that solved it - But it's just weird that it stopped working. Thanks for your answer.

@junedchhipa junedchhipa removed the bug Something isn't working label May 9, 2024
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

No branches or pull requests

3 participants