- Kibana Guide: other versions:
- Introduction
- Get started
- Set Up Kibana
- Discover
- Visualize
- Creating a Visualization
- Saving Visualizations
- Using rolled up data in a visualization
- Line, Area, and Bar charts
- Controls Visualization
- Data Table
- Markdown Widget
- Metric
- Goal and Gauge
- Pie Charts
- Coordinate Maps
- Region Maps
- Timelion
- TSVB
- Tag Clouds
- Heatmap Chart
- Vega Graphs
- Inspecting Visualizations
- Dashboard
- Canvas
- Graph data connections
- Machine learning
- Elastic Maps
- Code
- Infrastructure
- Logs
- APM
- Uptime
- SIEM
- Dev Tools
- Stack Monitoring
- Management
- Reporting from Kibana
- REST API
- Kibana plugins
- Limitations
- Release Highlights
- Breaking Changes
- Release Notes
- Developer guide
IMPORTANT: No additional bug fixes or documentation updates
will be released for this version. For the latest information, see the
current release documentation.
Visualization Editors
editVisualization Editors
editBy default, visualizations will use the default
editor.
This is the sidebar editor you see in many of the Kibana visualizations. You can also write your own editor.
default
editor controller
editThe default editor controller receives an optionsTemplate
or optionsTabs
parameter.
These can be either an AngularJS template or React component.
{ name: 'my_new_vis', title: 'My New Vis', icon: 'my_icon', description: 'Cool new chart', editor: 'default', editorConfig: { optionsTemplate: '<my-custom-options-directive></my-custom-options-directive>' // or optionsTemplate: MyReactComponent // or if multiple tabs are required: optionsTabs: [ { title: 'tab 1', template: '<div>....</div> }, { title: 'tab 2', template: '<my-custom-options-directive></my-custom-options-directive>' }, { title: 'tab 3', template: MyReactComponent } ] } }
custom editor controller
editYou can create a custom editor controller. To do so pass an Editor object (the same format as VisController class). You can make your controller take extra configuration which is passed to the editorConfig property.
import { VisFactoryProvider } from 'ui/vis/vis_factory'; class MyEditorController { constructor(el, vis) { this.el = el; this.vis = vis; this.config = vis.type.editorConfig; } async render(visData) { console.log(this.config.my); ... return 'done rendering'; } destroy() { console.log('destroying'); } } const MyNewVisType = (Private) => { const VisFactory = Private(VisFactoryProvider); return VisFactory.createAngularVisualization({ name: 'my_new_vis', title: 'My New Vis', icon: 'my_icon', description: 'Cool new chart', editor: MyEditorController, editorConfig: { my: 'custom config' } }); } VisTypesRegistryProvider.register(MyNewVisType);
Was this helpful?
Thank you for your feedback.