Skip to content

Instantly share code, notes, and snippets.

@ryaz
Created January 28, 2014 14:23
Show Gist options
  • Save ryaz/8668605 to your computer and use it in GitHub Desktop.
Save ryaz/8668605 to your computer and use it in GitHub Desktop.
chart.js one point
min = _.max(chartData.datasets[0].data)
max = _.min(chartData.datasets[0].data)
if max == min
opt = {
scaleOverride : true,
scaleSteps : 3,
scaleStepWidth : 1,
scaleStartValue : max - 2
}
new Chart(ctx).Line(chartData, opt)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment