mirror of
https://github.com/plasma-umass/coz.git
synced 2024-09-11 04:55:25 +03:00
Fix Positioning of Y Axis Label
This commit is contained in:
parent
2056d9253c
commit
27c84b8040
@ -365,7 +365,7 @@ var Profile = /** @class */ (function () {
|
||||
var div_height = 190;
|
||||
var svg_width = div_width - 10;
|
||||
var svg_height = div_height - 40;
|
||||
var margins = { left: 55, right: 20, top: 10, bottom: 35 };
|
||||
var margins = { left: 60, right: 20, top: 10, bottom: 35 };
|
||||
var plot_width = svg_width - margins.left - margins.right;
|
||||
var plot_height = svg_height - margins.top - margins.bottom;
|
||||
var radius = 3;
|
||||
@ -513,8 +513,8 @@ var Profile = /** @class */ (function () {
|
||||
/****** Add or update y-axis title ******/
|
||||
var ytitle_sel = plot_area_sel.selectAll('text.ytitle').data([0]);
|
||||
ytitle_sel.enter().append('text').attr('class', 'ytitle');
|
||||
ytitle_sel.attr('x', -yscale(0)) // x and y are flipped because of rotation
|
||||
.attr('y', -50) // Approximate width of y-axis
|
||||
ytitle_sel.attr('x', -(svg_height - margins.bottom) / 2) // x and y are flipped because of rotation
|
||||
.attr('y', -45) // Approximate width of y-axis
|
||||
.attr('transform', 'rotate(-90)')
|
||||
.style('text-anchor', 'middle')
|
||||
.style('alignment-baseline', 'central')
|
||||
|
File diff suppressed because one or more lines are too long
@ -447,7 +447,7 @@ class Profile {
|
||||
const div_height = 190;
|
||||
const svg_width = div_width - 10;
|
||||
const svg_height = div_height - 40;
|
||||
const margins = {left: 55, right: 20, top: 10, bottom: 35};
|
||||
const margins = {left: 60, right: 20, top: 10, bottom: 35};
|
||||
const plot_width = svg_width - margins.left - margins.right;
|
||||
const plot_height = svg_height - margins.top - margins.bottom;
|
||||
const radius = 3;
|
||||
@ -619,8 +619,8 @@ class Profile {
|
||||
/****** Add or update y-axis title ******/
|
||||
let ytitle_sel = plot_area_sel.selectAll('text.ytitle').data([0]);
|
||||
ytitle_sel.enter().append('text').attr('class', 'ytitle');
|
||||
ytitle_sel.attr('x', -yscale(0)) // x and y are flipped because of rotation
|
||||
.attr('y', -50) // Approximate width of y-axis
|
||||
ytitle_sel.attr('x', - ( svg_height - margins.bottom) / 2)
|
||||
.attr('y', -45) // Approximate width of y-axis
|
||||
.attr('transform', 'rotate(-90)')
|
||||
.style('text-anchor', 'middle')
|
||||
.style('alignment-baseline', 'central')
|
||||
|
Loading…
Reference in New Issue
Block a user