Skip to content
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 3 additions & 0 deletions src/components/VisualizationTypeSelector/ListItemIcon.js
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@ import {
VIS_TYPE_AREA,
VIS_TYPE_STACKED_AREA,
VIS_TYPE_PIE,
VIS_TYPE_DONUT,
VIS_TYPE_RADAR,
VIS_TYPE_GAUGE,
VIS_TYPE_YEAR_OVER_YEAR_LINE,
Expand Down Expand Up @@ -46,6 +47,8 @@ const ListItemIcon = ({ iconType, style }) => {
return <StackedBarIcon style={style} />
case VIS_TYPE_PIE:
return <PieIcon style={style} />
case VIS_TYPE_DONUT:
return <PieIcon style={style} />
case VIS_TYPE_GAUGE:
return <GaugeIcon style={style} />
case VIS_TYPE_LINE:
Expand Down
2 changes: 2 additions & 0 deletions src/modules/layoutValidation.js
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@ import {
VIS_TYPE_YEAR_OVER_YEAR_LINE,
VIS_TYPE_YEAR_OVER_YEAR_COLUMN,
VIS_TYPE_PIE,
VIS_TYPE_DONUT,
VIS_TYPE_GAUGE,
VIS_TYPE_SINGLE_VALUE,
VIS_TYPE_PIVOT_TABLE,
Expand Down Expand Up @@ -144,6 +145,7 @@ const validateOutlierTableLayout = (layout) => {
export const validateLayout = (layout) => {
switch (layout.type) {
case VIS_TYPE_PIE:
case VIS_TYPE_DONUT:
return validatePieLayout(layout)
case VIS_TYPE_YEAR_OVER_YEAR_COLUMN:
case VIS_TYPE_YEAR_OVER_YEAR_LINE:
Expand Down
2 changes: 2 additions & 0 deletions src/modules/options/config.js
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@ import {
VIS_TYPE_PIVOT_TABLE,
VIS_TYPE_PIE,
VIS_TYPE_GAUGE,
VIS_TYPE_DONUT,
VIS_TYPE_SINGLE_VALUE,
VIS_TYPE_SCATTER,
VIS_TYPE_OUTLIER_TABLE,
Expand Down Expand Up @@ -51,6 +52,7 @@ export const getOptionsByType = ({
case VIS_TYPE_GAUGE:
return gaugeConfig()
case VIS_TYPE_PIE:
case VIS_TYPE_DONUT:
return pieConfig()
case VIS_TYPE_SINGLE_VALUE:
return singleValueConfig()
Expand Down
5 changes: 5 additions & 0 deletions src/modules/visualization.js
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,7 @@ import {
VIS_TYPE_AREA,
VIS_TYPE_STACKED_AREA,
VIS_TYPE_PIE,
VIS_TYPE_DONUT,
VIS_TYPE_RADAR,
VIS_TYPE_GAUGE,
VIS_TYPE_YEAR_OVER_YEAR_LINE,
Expand All @@ -32,6 +33,7 @@ export const visTypes = [
VIS_TYPE_AREA,
VIS_TYPE_STACKED_AREA,
VIS_TYPE_PIE,
VIS_TYPE_DONUT,
VIS_TYPE_RADAR,
VIS_TYPE_GAUGE,
VIS_TYPE_YEAR_OVER_YEAR_LINE,
Expand Down Expand Up @@ -69,6 +71,9 @@ export const getVisTypeDescriptions = () => ({
[VIS_TYPE_PIE]: i18n.t(
'Compare parts of a whole at a single point in time. Recommend period as filter.'
),
[VIS_TYPE_DONUT]: i18n.t(
'Pie with a hole :-)'
),
[VIS_TYPE_RADAR]: i18n.t(
'Compare several items against multiple variables.'
),
Expand Down
3 changes: 3 additions & 0 deletions src/reducers/current.js
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@ import {
VIS_TYPE_YEAR_OVER_YEAR_LINE,
VIS_TYPE_YEAR_OVER_YEAR_COLUMN,
VIS_TYPE_PIE,
VIS_TYPE_DONUT,
VIS_TYPE_GAUGE,
VIS_TYPE_OUTLIER_TABLE,
VIS_TYPE_SINGLE_VALUE,
Expand Down Expand Up @@ -53,6 +54,7 @@ export default (state = DEFAULT_CURRENT, action) => {
case SET_CURRENT_FROM_UI: {
switch (action.value.ui.type) {
case VIS_TYPE_PIE:
case VIS_TYPE_DONUT:
return getPieCurrentFromUi(state, action.value.ui)
case VIS_TYPE_SINGLE_VALUE:
case VIS_TYPE_GAUGE:
Expand Down Expand Up @@ -92,6 +94,7 @@ export const sGetCurrentFromUi = (state) => {

switch (ui.type) {
case VIS_TYPE_PIE:
case VIS_TYPE_DONUT:
return getPieCurrentFromUi(state, ui)
case VIS_TYPE_SINGLE_VALUE:
case VIS_TYPE_GAUGE:
Expand Down