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

No Axis shown when gridLines.drawOnChartArea is false in Chart JS bleeding Edge #1740

Closed
Rydori opened this issue Dec 4, 2015 · 5 comments
Closed
Milestone

Comments

@Rydori
Copy link
Contributor

Rydori commented Dec 4, 2015

I tried to get rid of the grid lines. but when i try to, the axis also won't show. (The ticks are visible but the axis itself x and y have no line). Is it possible to only draw the axis itself without drawing all the other grid lines?
the following Code is my config for the Chart

  var config = {
type: 'line',
data: {
datasets: [{
label: "test",
data: chartData, // chart data is a data source with objects like {x:, y:}
fill: false
}]
},
options: {
responsive: true,
scales: {
xAxes: [
{
gridLines: {
drawOnChartArea:false,
color:"rgba(0, 0, 0, 0.75)",
zeroLineWidth: 2,
offsetGridLines: true,
zeroLineColor:"rgba(0, 0, 0, 0.75)"
},
type: "time",
display: true,
time: {
format:'MM/DD/YYYY HH:mm',
unit: "month",
displayFormats: {
'month': 'MM.YYYY',
},
},
scaleLabel: {
show: true,
labelString: 'Date'
},
} ],
yAxes: [{
gridLines: {
drawOnChartArea:false,
color:"rgba(0, 0, 0, 0.75)"
},
ticks:{
beginAtZero:false,
},
display: true,
scaleLabel: {
show: true,
labelString: 'm'
}
}]
},
elements: {
line: {
tension: 0.4
}
},
}
};

@etimberg etimberg added the v2.x label Dec 4, 2015
@etimberg
Copy link
Member

etimberg commented Dec 4, 2015

I'm not sure i understand fully, which lines aren't showing up?

@Rydori
Copy link
Contributor Author

Rydori commented Dec 4, 2015

the horizontal line of the x-Axis on which the ticks should be and the vertical line of the y-axis

@etimberg
Copy link
Member

etimberg commented Dec 4, 2015

Ah ok, i understand. Should be a relatively easy fix

@etimberg
Copy link
Member

Tying this together with #1769 to fix at the same time.

@etimberg etimberg added this to the Version 2.0 milestone Dec 26, 2015
This was referenced Dec 26, 2015
@etimberg
Copy link
Member

Closing as #1836 was merged

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

2 participants