mirror of
https://github.com/elastic/kibana.git
synced 2025-04-24 01:38:56 -04:00
check if grid lines can be drawn (#13860)
This commit is contained in:
parent
51aab7edb2
commit
c49ebde2bd
1 changed files with 8 additions and 2 deletions
|
@ -39,14 +39,20 @@ export function VislibGridProvider() {
|
|||
|
||||
drawCategoryLines(svg, width, height) {
|
||||
const axis = this._handler.categoryAxes[0];
|
||||
axis.getScale().ticks().forEach(tick => {
|
||||
if (!axis) return;
|
||||
const ticks = axis.getScale().ticks;
|
||||
if (!ticks) return;
|
||||
ticks().forEach(tick => {
|
||||
this.drawLine(svg, tick, axis, width, height);
|
||||
});
|
||||
}
|
||||
|
||||
drawValueLines(svg, width, height) {
|
||||
const axis = this._handler.valueAxes.find(axis => axis.axisConfig.get('id') === this.get('valueAxis'));
|
||||
axis.getScale().ticks().forEach(tick => {
|
||||
if (!axis) return;
|
||||
const ticks = axis.getScale().ticks;
|
||||
if (!ticks) return;
|
||||
ticks().forEach(tick => {
|
||||
this.drawLine(svg, tick, axis, width, height);
|
||||
});
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue