Skip to content

Commit

Permalink
Merge pull request #2 from nightscout/pr/5081
Browse files Browse the repository at this point in the history
Fix font size on axis labels
  • Loading branch information
jpcunningh committed Oct 20, 2019
2 parents cf63611 + 64d9dfb commit 7f1ea07
Showing 1 changed file with 13 additions and 6 deletions.
19 changes: 13 additions & 6 deletions lib/client/chart.js
Original file line number Diff line number Diff line change
Expand Up @@ -150,7 +150,7 @@ function init (client, d3, $) {

chart.xAxis = d3.axisBottom(xScale)
.tickFormat(tickFormat)
.ticks(4);
.ticks(6);

chart.yAxis = d3.axisLeft(yScale)
.tickFormat(d3.format('d'))
Expand All @@ -164,6 +164,9 @@ function init (client, d3, $) {
.tickFormat(d3.format('d'))
.tickValues(tickValues);

d3.select('tick')
.style('z-index', '10000');

// setup a brush
chart.brush = d3.brushX()
.on('start', brushStarted)
Expand Down Expand Up @@ -201,22 +204,26 @@ function init (client, d3, $) {

// create the x axis container
chart.focus.append('g')
.attr('class', 'x axis');

.attr('class', 'x axis')
.style("font-size", "16px");

// create the y axis container
chart.focus.append('g')
.attr('class', 'y axis');
.attr('class', 'y axis')
.style("font-size", "16px");

chart.context = chart.charts.append('g')
.attr('class', 'chart-context');

// create the x axis container
chart.context.append('g')
.attr('class', 'x axis');
.attr('class', 'x axis')
.style("font-size", "16px");

// create the y axis container
chart.context.append('g')
.attr('class', 'y axis');
.attr('class', 'y axis')
.style("font-size", "16px");

chart.createBrushedRange = function () {
var brushedRange = chart.theBrush && d3.brushSelection(chart.theBrush.node()) || null;
Expand Down

0 comments on commit 7f1ea07

Please sign in to comment.