Skip to content

Commit

Permalink
dual axes
Browse files Browse the repository at this point in the history
  • Loading branch information
pikesley committed Feb 1, 2016
1 parent 97f4b6f commit 2b9de03
Showing 1 changed file with 12 additions and 2 deletions.
14 changes: 12 additions & 2 deletions app/views/charts/index.html.erb
Original file line number Diff line number Diff line change
Expand Up @@ -46,6 +46,7 @@
var meds = {
x: points(json['meds'], 'dose')['x'],
y: points(json['meds'], 'dose')['y'],
yaxis: 'y2',
mode: 'markers', //+text',
// textposition: 'top right',
name: 'Meds',
Expand All @@ -67,14 +68,23 @@
tickformat: "%a %H:%M"
},
yaxis: {
title: 'mmol/L',
title: 'Glucose (mmol/L)',
titlefont: {
size: 14,
color: '#7f7f7f'
}
},
yaxis2: {
overlaying: 'y',
side: 'right',
title: 'Insulin (Units)',
titlefont: {
size: 14,
color: '#7f7f7f'
}
},
margin: {
l: 40, r: 10
l: 50, r: 40
},
legend: {
xanchor:"center",
Expand Down

0 comments on commit 2b9de03

Please sign in to comment.