UNPKG

@spalger/kibana

Version:

Kibana is an open source (Apache Licensed), browser based analytics and search dashboard for Elasticsearch. Kibana is a snap to setup and start using. Kibana strives to be easy to get started with, while also being flexible and powerful, just like Elastic

23 lines (19 loc) 626 B
define(function (require) { return function PointSeriesInitYAxis() { var _ = require('lodash'); return function initYAxis(chart) { var y = chart.aspects.y; var x = chart.aspects.x; if (_.isArray(y)) { // TODO: vis option should allow choosing this format chart.yAxisFormatter = y[0].agg.fieldFormatter(); chart.yAxisLabel = ''; // use the legend } else { chart.yAxisFormatter = y.agg.fieldFormatter(); chart.yAxisLabel = y.col.title; } var xAggOutput = x.agg.write(); chart.yScale = xAggOutput.metricScale || null; }; }; });