Skip to content

Commit

Permalink
setting defaults
Browse files Browse the repository at this point in the history
  • Loading branch information
ppisljar authored and thomasneirynck committed Sep 5, 2017
1 parent fb88751 commit 7b3cb38
Show file tree
Hide file tree
Showing 7 changed files with 26 additions and 22 deletions.
5 changes: 3 additions & 2 deletions src/core_plugins/kbn_vislib_vis_types/public/area.js
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,8 @@ export default function PointSeriesVisType(Private) {
defaults: {
type: 'area',
grid: {
categoryLines: false,
categoryLines: true,
valueAxis: 'ValueAxis-1',
style: {
color: '#eee'
}
Expand Down Expand Up @@ -72,7 +73,7 @@ export default function PointSeriesVisType(Private) {
id: '1'
},
drawLinesBetweenPoints: true,
showCircles: true,
showCircles: false,
interpolate: 'linear',
valueAxis: 'ValueAxis-1'
}],
Expand Down
5 changes: 3 additions & 2 deletions src/core_plugins/kbn_vislib_vis_types/public/histogram.js
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,8 @@ export default function PointSeriesVisType(Private) {
defaults: {
type: 'histogram',
grid: {
categoryLines: false,
categoryLines: true,
valueAxis: 'ValueAxis-1',
style: {
color: '#eee'
}
Expand Down Expand Up @@ -74,7 +75,7 @@ export default function PointSeriesVisType(Private) {
},
valueAxis: 'ValueAxis-1',
drawLinesBetweenPoints: true,
showCircles: true
showCircles: false
}
],
addTooltip: true,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,8 @@ export default function PointSeriesVisType(Private) {
defaults: {
type: 'histogram',
grid: {
categoryLines: false,
categoryLines: true,
valueAxis: 'ValueAxis-1',
style: {
color: '#eee'
}
Expand Down Expand Up @@ -77,7 +78,7 @@ export default function PointSeriesVisType(Private) {
},
valueAxis: 'ValueAxis-1',
drawLinesBetweenPoints: true,
showCircles: true
showCircles: false
}],
addTooltip: true,
addLegend: true,
Expand Down
5 changes: 3 additions & 2 deletions src/core_plugins/kbn_vislib_vis_types/public/line.js
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,8 @@ export default function PointSeriesVisType(Private) {
defaults: {
type: 'line',
grid: {
categoryLines: false,
categoryLines: true,
valueAxis: 'ValueAxis-1',
style: {
color: '#eee'
}
Expand Down Expand Up @@ -74,7 +75,7 @@ export default function PointSeriesVisType(Private) {
},
valueAxis: 'ValueAxis-1',
drawLinesBetweenPoints: true,
showCircles: true
showCircles: false
}
],
addTooltip: true,
Expand Down
2 changes: 1 addition & 1 deletion src/ui/public/vislib/lib/axis/axis_config.js
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,7 @@ export function VislibLibAxisConfigProvider() {
filter: false,
color: '#666',
font: '"Open Sans", "Lato", "Helvetica Neue", Helvetica, Arial, sans-serif',
fontSize: '8pt',
fontSize: '14px',
truncate: 100
},
title: {
Expand Down
22 changes: 11 additions & 11 deletions src/ui/public/vislib/lib/axis/axis_title.js
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@ export function VislibLibAxisTitleProvider() {
const div = d3.select(el);
const width = $(el).width();
const height = $(el).height();
const titlePadding = 12;
const titlePadding = 16;
const axisPrefix = config.isHorizontal() ? 'x' : 'y';

const svg = div.append('svg')
Expand All @@ -37,16 +37,16 @@ export function VislibLibAxisTitleProvider() {
.attr('class', `axis-title ${axisPrefix}-axis-title`);

const bbox = svg.append('text')
.attr('transform', function () {
if (config.isHorizontal()) {
return `translate(${width / 2},${titlePadding})`;
}
return `translate(${titlePadding},${height / 2}) rotate(270)`;
})
.attr('text-anchor', 'middle')
.text(config.get('title.text'))
.node()
.getBBox();
.text(config.get('title.text'))
.attr('text-anchor', 'middle')
.attr('transform', function () {
if (config.isHorizontal()) {
return `translate(${width / 2},${titlePadding})`;
}
return `translate(${titlePadding},${height / 2}) rotate(270)`;
})
.node()
.getBBox();

if (config.isHorizontal()) {
svg.attr('height', bbox.height);
Expand Down
4 changes: 2 additions & 2 deletions src/ui/public/vislib/styles/_layout.less
Original file line number Diff line number Diff line change
Expand Up @@ -66,9 +66,9 @@
}

.y-axis-title text, .x-axis-title text {
font-size: 9pt;
font-size: 16px;
fill: @vis-axis-title-color;
font-weight: bold;
//font-weight: bold;
}

.chart-title {
Expand Down

0 comments on commit 7b3cb38

Please sign in to comment.