UNPKG

kibana-123

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

21 lines (17 loc) 520 B
import _ from 'lodash'; import VislibComponentsLabelsPieReturnPieNamesProvider from './return_pie_names'; export default function GetPieNames(Private) { const returnNames = Private(VislibComponentsLabelsPieReturnPieNamesProvider); return function (data, columns) { const slices = data.slices; if (slices.children) { return _(returnNames(slices.children, 0, columns)) .sortBy(function (obj) { return obj.index; }) .pluck('key') .unique() .value(); } }; };