Skip to content
Snippets Groups Projects
  • Aleksandr Lesnenko's avatar
    23837a6f
    Static row chart (#25829) · 23837a6f
    Aleksandr Lesnenko authored
    * support static row chart on the backend
    
    * update and add types
    
    * update types
    
    * add chart columns helper, dataset grouping
    
    * add viz settings helpers
    
    * fix text measuring
    
    * add generic row chart component for static and dynamic rendering
    
    * update deps
    
    * fix jest config for d3
    
    * allow importing cljs in static viz
    
    * add a hook for getting chart columns and series
    
    * add a static row chart
    
    * build cljs before static viz
    
    * specs
    
    * add stories, moved isomorphic row chart component to the shared folder
    
    * update import
    
    * fix backend merge
    
    * remove an extra line
    
    * one more extra line
    
    * exclude unused props from the row chart
    
    * cleanup
    
    * review
    
    * fix types
    
    * fix log scale
    
    * add visual spec, fix goal label truncate
    
    * review
    
    * fix mock path
    
    * fix specs
    Static row chart (#25829)
    Aleksandr Lesnenko authored
    * support static row chart on the backend
    
    * update and add types
    
    * update types
    
    * add chart columns helper, dataset grouping
    
    * add viz settings helpers
    
    * fix text measuring
    
    * add generic row chart component for static and dynamic rendering
    
    * update deps
    
    * fix jest config for d3
    
    * allow importing cljs in static viz
    
    * add a hook for getting chart columns and series
    
    * add a static row chart
    
    * build cljs before static viz
    
    * specs
    
    * add stories, moved isomorphic row chart component to the shared folder
    
    * update import
    
    * fix backend merge
    
    * remove an extra line
    
    * one more extra line
    
    * exclude unused props from the row chart
    
    * cleanup
    
    * review
    
    * fix types
    
    * fix log scale
    
    * add visual spec, fix goal label truncate
    
    * review
    
    * fix mock path
    
    * fix specs
Code owners
Assign users and groups as approvers for specific file changes. Learn more.
constants.ts 1.52 KiB
import { GAUGE_CHART_TYPE } from "metabase/static-viz/components/Gauge/constants";
import { GAUGE_CHART_DEFAULT_OPTIONS } from "metabase/static-viz/components/Gauge/constants.dev";
import {
  ROW_CHART_TYPE,
  ROW_CHART_DEFAULT_OPTIONS,
} from "metabase/static-viz/components/RowChart/constants";
import {
  CATEGORICAL_DONUT_CHART_DEFAULT_OPTIONS,
  CATEGORICAL_DONUT_CHART_TYPE,
} from "../../components/CategoricalDonutChart/constants";
import {
  TIME_SERIES_WATERFALL_CHART_DEFAULT_OPTIONS,
  CATEGORICAL_WATERFALL_CHART_DEFAULT_OPTIONS,
  WATERFALL_CHART_TYPE,
} from "../../components/WaterfallChart/constants";
import {
  PROGRESS_BAR_DEFAULT_DATA_1,
  PROGRESS_BAR_TYPE,
} from "../../components/ProgressBar/constants";
import {
  LINE_AREA_BAR_CHART_TYPE,
  LINE_AREA_BAR_DEFAULT_OPTIONS_1,
} from "../../components/LineAreaBarChart/constants";
import {
  FUNNEL_CHART_DEFAULT_OPTIONS,
  FUNNEL_CHART_TYPE,
} from "../../components/FunnelChart/constants";

export const STATIC_CHART_TYPES = [
  CATEGORICAL_DONUT_CHART_TYPE,
  WATERFALL_CHART_TYPE,
  WATERFALL_CHART_TYPE,
  GAUGE_CHART_TYPE,
  PROGRESS_BAR_TYPE,
  LINE_AREA_BAR_CHART_TYPE,
  FUNNEL_CHART_TYPE,
  ROW_CHART_TYPE,
] as const;

export const STATIC_CHART_DEFAULT_OPTIONS = [
  CATEGORICAL_DONUT_CHART_DEFAULT_OPTIONS,
  CATEGORICAL_WATERFALL_CHART_DEFAULT_OPTIONS,
  TIME_SERIES_WATERFALL_CHART_DEFAULT_OPTIONS,
  GAUGE_CHART_DEFAULT_OPTIONS,
  PROGRESS_BAR_DEFAULT_DATA_1,
  LINE_AREA_BAR_DEFAULT_OPTIONS_1,
  FUNNEL_CHART_DEFAULT_OPTIONS,
  ROW_CHART_DEFAULT_OPTIONS,
] as const;