From bec4bc62da8162d013766035b75a5aa1bae68c1a Mon Sep 17 00:00:00 2001 From: Sulka Haro Date: Sun, 20 Oct 2019 16:07:23 +0300 Subject: [PATCH 1/2] Fix font size on axis labels --- lib/client/chart.js | 16 ++++++++++------ 1 file changed, 10 insertions(+), 6 deletions(-) diff --git a/lib/client/chart.js b/lib/client/chart.js index cab0262f2b6..c48bfdf80f6 100644 --- a/lib/client/chart.js +++ b/lib/client/chart.js @@ -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')) @@ -201,22 +201,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; From 64d9dfb2b29c33e5d4b66bffa3cb3c903513cd30 Mon Sep 17 00:00:00 2001 From: Sulka Haro Date: Sun, 20 Oct 2019 16:15:50 +0300 Subject: [PATCH 2/2] Render ticks on top of everything --- lib/client/chart.js | 3 +++ 1 file changed, 3 insertions(+) diff --git a/lib/client/chart.js b/lib/client/chart.js index c48bfdf80f6..9a604e8f959 100644 --- a/lib/client/chart.js +++ b/lib/client/chart.js @@ -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)