Skip to content

Commit

Permalink
Nightingale Rose Chart
Browse files Browse the repository at this point in the history
  • Loading branch information
Mogball committed Dec 4, 2017
1 parent 89f6ccc commit d507380
Show file tree
Hide file tree
Showing 8 changed files with 661 additions and 0 deletions.
Binary file added superset/assets/images/viz_thumbnails/rose.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
11 changes: 11 additions & 0 deletions superset/assets/javascripts/explore/stores/controls.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -1609,6 +1609,17 @@ export const controls = {
controlName: 'TimeSeriesColumnControl',
},

rose_area_proportion: {
type: 'CheckboxControl',
label: t('Use Area Proportions'),
description: t(
'Check if the Rose Chart should use segment area instead of ' +
'segment radius for proportioning',
),
default: false,
renderTrigger: true,
},

time_series_option: {
type: 'SelectControl',
label: t('Options'),
Expand Down
19 changes: 19 additions & 0 deletions superset/assets/javascripts/explore/stores/visTypes.js
Original file line number Diff line number Diff line change
Expand Up @@ -1306,6 +1306,25 @@ export const visTypes = {
],
},

rose: {
label: t('Time Series - Nightingale Rose Chart'),
showOnExplore: true,
requiresTime: true,
controlPanelSections: [
sections.NVD3TimeSeries[0],
{
label: t('Chart Options'),
expanded: false,
controlSetRows: [
['color_scheme'],
['number_format', 'date_time_format'],
['rich_tooltip', 'rose_area_proportion'],
],
},
sections.NVD3TimeSeries[1],
],
},

partition: {
label: 'Partition Diagram',
showOnExplore: true,
Expand Down
1 change: 1 addition & 0 deletions superset/assets/visualizations/main.js
Original file line number Diff line number Diff line change
Expand Up @@ -40,5 +40,6 @@ const vizMap = {
deck_screengrid: require('./deckgl/screengrid.jsx'),
deck_grid: require('./deckgl/grid.jsx'),
deck_hex: require('./deckgl/hex.jsx'),
rose: require('./rose.jsx'),
};
export default vizMap;
24 changes: 24 additions & 0 deletions superset/assets/visualizations/rose.css
Original file line number Diff line number Diff line change
@@ -0,0 +1,24 @@
.rose path {
transition: fill-opacity 180ms linear;
stroke: #fff;
stroke-width: 1px;
stroke-opacity: 1;
fill-opacity: 0.75;
}

.rose text {
font: 400 12px Arial, sans-serif;
pointer-events: none;
}

.rose .clickable path {
cursor: pointer;
}

.rose .hover path {
fill-opacity: 1;
}

.nv-legend .nv-series {
cursor: pointer;
}
Loading

0 comments on commit d507380

Please sign in to comment.