Skip to content

Commit

Permalink
Merge pull request #160 from RhoInc/fix-y-tick-labels
Browse files Browse the repository at this point in the history
Fix y tick labels
  • Loading branch information
samussiah authored Jul 23, 2019
2 parents 8661a8f + eedc24b commit 0dce4ff
Show file tree
Hide file tree
Showing 6 changed files with 7 additions and 5,020 deletions.
4 changes: 2 additions & 2 deletions package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

10 changes: 2 additions & 8 deletions queryOverview.js
Original file line number Diff line number Diff line change
Expand Up @@ -718,9 +718,7 @@
Other controls
\---------------------------------------------------------------------------------****/
'.qo-control-grouping--other-controls {' +
' float: right;' + //' display: flex;' +
//' flex-wrap: wrap;' +
//' justify-content: space-evenly;' +
' float: right;' +
' width: 25%;' +
'}',
'.qo-control-grouping--other-controls .control-group {' +
Expand Down Expand Up @@ -813,10 +811,6 @@
' padding-left: 8px;' +
' margin-right: 5px !important;' +
'}',
'.qo-component--chart .y.axis .tick text {' +
' font-family: "Lucida Console", "Courier New", "Monospace";' +
' font-size: 14px;' +
'}',
'.qo-footnote {' +
' width: 100%;' +
' text-align: center;' +
Expand Down Expand Up @@ -1645,7 +1639,7 @@
})
) *
this.config.fontSize *
0.5 +
0.6 +
this.config.fontSize * 1.5 * 1.5 +
6; //Set the left margin to the minimum of one quarter of the container width and the maximum number of characters in the y-axis tick labels (minimum: 100 pixels).

Expand Down
2 changes: 1 addition & 1 deletion src/chart/onDraw/setLeftMargin.js
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ export default function setLeftMargin() {

//Find maximum number of characters in the y-axis tick labels (minimum: 7 characters).
this.config.maxYAxisTickLabelLength =
Math.max(7, max(this.y_dom, d => d.length)) * this.config.fontSize * 0.5 +
Math.max(7, max(this.y_dom, d => d.length)) * this.config.fontSize * 0.6 +
this.config.fontSize * 1.5 * 1.5 +
6;

Expand Down
7 changes: 0 additions & 7 deletions src/styles.js
Original file line number Diff line number Diff line change
Expand Up @@ -63,9 +63,6 @@ export default function styles(document) {

'.qo-control-grouping--other-controls {' +
' float: right;' +
//' display: flex;' +
//' flex-wrap: wrap;' +
//' justify-content: space-evenly;' +
' width: 25%;' +
'}',
'.qo-control-grouping--other-controls .control-group {' +
Expand Down Expand Up @@ -191,10 +188,6 @@ export default function styles(document) {
' padding-left: 8px;' +
' margin-right: 5px !important;' +
'}',
'.qo-component--chart .y.axis .tick text {' +
' font-family: "Lucida Console", "Courier New", "Monospace";' +
' font-size: 14px;' +
'}',
'.qo-footnote {' +
' width: 100%;' +
' text-align: center;' +
Expand Down
3 changes: 2 additions & 1 deletion test-page/index.html
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
<!DOCTYPE html>
<html>
<head>
<title>Query Overview</title>
<title>Query Overview: Test Page</title>
<meta http-equiv = 'Content-Type' content = 'text/html; charset = utf-8'>

<script type = 'text/javascript' src = 'https://d3js.org/d3.v3.min.js'></script>
Expand All @@ -10,6 +10,7 @@

<link type = 'text/css' rel = 'stylesheet' href = 'https://cdn.jsdelivr.net/gh/RhoInc/Webcharts/css/webcharts.min.css'>
<link type = 'text/css' rel = 'stylesheet' href = './index.css'>

</head>

<body>
Expand Down
Loading

0 comments on commit 0dce4ff

Please sign in to comment.