mirror of
https://github.com/apache/superset.git
synced 2026-04-19 08:04:53 +00:00
Add NVD3's bullet chart (#1775)
* Add NVD3's bullet chart. * Add empty lines before nested function definitions. * Add thumbnail for bullet chart. * Add bullet chart to gallery.rst. * Add "requiresTime: false", fix indentation. * Avoid scaling bullet chart vertically. * Use a default if no range is specified. * Fix coloring of bullet chart.
This commit is contained in:
committed by
Maxime Beauchemin
parent
afb3c24d5a
commit
2993ff1d75
@@ -983,6 +983,48 @@ export const fields = {
|
||||
],
|
||||
description: 'The color for points and clusters in RGB',
|
||||
},
|
||||
|
||||
ranges: {
|
||||
type: 'TextField',
|
||||
label: 'Ranges',
|
||||
default: '',
|
||||
description: 'Ranges to highlight with shading',
|
||||
},
|
||||
|
||||
range_labels: {
|
||||
type: 'TextField',
|
||||
label: 'Range labels',
|
||||
default: '',
|
||||
description: 'Labels for the ranges',
|
||||
},
|
||||
|
||||
markers: {
|
||||
type: 'TextField',
|
||||
label: 'Markers',
|
||||
default: '',
|
||||
description: 'List of values to mark with triangles',
|
||||
},
|
||||
|
||||
marker_labels: {
|
||||
type: 'TextField',
|
||||
label: 'Marker labels',
|
||||
default: '',
|
||||
description: 'Labels for the markers',
|
||||
},
|
||||
|
||||
marker_lines: {
|
||||
type: 'TextField',
|
||||
label: 'Marker lines',
|
||||
default: '',
|
||||
description: 'List of values to mark with lines',
|
||||
},
|
||||
|
||||
marker_line_labels: {
|
||||
type: 'TextField',
|
||||
label: 'Marker line labels',
|
||||
default: '',
|
||||
description: 'Labels for the marker lines',
|
||||
},
|
||||
};
|
||||
export default fields;
|
||||
|
||||
|
||||
@@ -49,3 +49,8 @@ export function initialState(vizType = 'table', datasourceType = 'table') {
|
||||
};
|
||||
}
|
||||
|
||||
// Control Panel fields that re-render chart without need for 'Query button'
|
||||
export const autoQueryFields = [
|
||||
'datasource',
|
||||
'viz_type',
|
||||
];
|
||||
|
||||
@@ -354,6 +354,22 @@ const visTypes = {
|
||||
],
|
||||
},
|
||||
|
||||
bullet: {
|
||||
label: 'Bullet Chart',
|
||||
requiresTime: false,
|
||||
controlPanelSections: [
|
||||
{
|
||||
label: null,
|
||||
fieldSetRows: [
|
||||
['metric'],
|
||||
['ranges', 'range_labels'],
|
||||
['markers', 'marker_labels'],
|
||||
['marker_lines', 'marker_line_labels'],
|
||||
],
|
||||
},
|
||||
],
|
||||
},
|
||||
|
||||
big_number: {
|
||||
label: 'Big Number with Trendline',
|
||||
controlPanelSections: [
|
||||
|
||||
Reference in New Issue
Block a user