[email protected]
Posts: 6
Joined: Fri Nov 13, 2020 7:50 am

vertical axis lines doesn't appear

Vertical axis lines are not visible in x-axis. same goes for horizontal axis lines in y-axis.
tempsnip.png
tempsnip.png (83.66 KiB) Viewed 1671 times

Code: Select all

Highcharts.ganttChart('container', {
    		title: {
        		text: 'Go-Live Downtime'
    		},
			
			series: [{
        		name: 'gantt Chart example',
        		data: exampleData.map(function (outage, i) {
					return {
            			id: 'db-' +i,
            			name: outage.DATABASE,
            			start:$scope.timeInUtc(outage.STARTTIME),
            			end: $scope.timeInUtc(outage.ENDTIME),
						durationDb: outage.DURATIONDB,
						durationApp:outage.DURATIONAPP,
						y: i,
						color: outage.TYPE == 'DB'?'#BF0B23':'#FFA500'
					}
				})
    		}],
			
			yAxis: {
        		type: 'category',
        		grid: {
            		enabled: true,
					borderColor: 'rgba(0,0,0,0.3)',
            		borderWidth: 1,
            		columns: [{
                		title: {
                    		text: 'Database',
							y: -15
                		},
                		labels: {
                    		format: '{point.name}'
                		}
            		}, {
                		title: {
                    		text: 'Duration<br>(DB)(hrs)',
							y: -15
                		},
                		labels: {
							useHTML:true,
                    		format: '<p>&nbsp;&nbsp;&nbsp;{point.durationDb}&nbsp;&nbsp;&nbsp;</p>'
                		}
            		}, {
                		title: {
                    		text: 'Duration<br>(APP)(hrs)',
							y: -15
                		},
                		labels: {
                    		useHTML:true,
                    		format: '<p>&nbsp;&nbsp;&nbsp;{point.durationApp}&nbsp;&nbsp;&nbsp;</p>'
                		}
            		}]
        		}
    		}
		});
User avatar
sebastian.h
Posts: 1734
Joined: Fri Aug 07, 2020 7:08 am

Re: vertical axis lines doesn't appear

Hi gyananjaly!

Welcome to our forum and thanks for contacting us with your question.

I don't see anything that could disable the visibility of the axis lines in your config file.
Try to playback according to this example:
https://jsfiddle.net/BlackLabel/mLko5pgw/

Let me know how you're doing and feel free to ask.
Kindly regards.
Sebastian Hajdus
Highcharts Developer
[email protected]
Posts: 6
Joined: Fri Nov 13, 2020 7:50 am

Re: vertical axis lines doesn't appear

Hi sebastian,

Thanks for your reply,

I have tried with the same configs as in example, i even tried with creating a chart with scratch but same issue appears again.

Any suggestions on if any external factor in the page might effect these borders?

Thanks,
Gyan Anjaly
User avatar
sebastian.h
Posts: 1734
Joined: Fri Aug 07, 2020 7:08 am

Re: vertical axis lines doesn't appear

Hi Gyan,

I prepared for you an example where I change your data to default from example and axis lines are visible.
Probably there is something wrong with your data, do you have some errors in the console?

Live demo:
https://jsfiddle.net/BlackLabel/4mdL5r02/

Regards.
Sebastian Hajdus
Highcharts Developer
[email protected]
Posts: 6
Joined: Fri Nov 13, 2020 7:50 am

Re: vertical axis lines doesn't appear

Hi Sebastian,

I tried with copy pasting the code from fiddle without any change and i am still not getting the borders.
Capture.PNG
Capture.PNG (22.25 KiB) Viewed 1654 times
User avatar
sebastian.h
Posts: 1734
Joined: Fri Aug 07, 2020 7:08 am

Re: vertical axis lines doesn't appear

Hi,

It's weird, maybe it's a browser problem, what type of browser do you use?
Have you tried using other web browsers?

There are no errors in the console?

Regards.
Sebastian Hajdus
Highcharts Developer
[email protected]
Posts: 6
Joined: Fri Nov 13, 2020 7:50 am

Re: vertical axis lines doesn't appear

Hi,

I have tried in chrome, firefox and explorer same issue appears.

The only error in console is:

Highcharts warning: Deprecated member
- Highcharts.each: use Array.forEach

I dont suppose this has to do anything with borders?

Thanks,
Gyan
User avatar
sebastian.h
Posts: 1734
Joined: Fri Aug 07, 2020 7:08 am

Re: vertical axis lines doesn't appear

Hi,

Here is a topic about a similar error:
https://stackoverflow.com/questions/623 ... deprecated

https://www.highcharts.com/errors/32/?H ... ay.forEach

Have you updated Highcharts and modules, or you tried to install them in another local environment?

Regards.
Sebastian Hajdus
Highcharts Developer
[email protected]
Posts: 6
Joined: Fri Nov 13, 2020 7:50 am

Re: vertical axis lines doesn't appear

Hi,

I am using the updated version and i have fixed the forEach issue still no boundaries.

Is there a way to add these boundaries through javascript or any another way that might help?

Thanks,
Gyan
dominik.c
Posts: 2081
Joined: Fri Aug 07, 2020 7:07 am

Re: vertical axis lines doesn't appear

Hello!

So if it goes about vertical lines by default their width is set to 0. As you can read in our API: https://api.highcharts.com/gantt/xAxis.gridLineWidth

Here you've got an example demo with these lines visible: https://jsfiddle.net/BlackLabel/s9u0jvmz/

Best regards!
Dominik Chudy
Highcharts Developer

Return to “Highcharts Gantt”