Skip to content
Snippets Groups Projects
This project is mirrored from https://github.com/metabase/metabase. Pull mirroring updated .
  1. Aug 02, 2024
  2. Jul 31, 2024
    • Emmad Usmani's avatar
      migrate pie chart to echarts (#43555) · 4ec1fd88
      Emmad Usmani authored
      
      * echarts pie
      
      * setup rendering pipeline for static pie chart (#43547)
      
      * setup rendering pipeline for static pie chart
      
      * remove more donut code from BE
      
      * compute viz settings for static pie chart (#43548)
      
      * compute viz settings for static pie chart
      
      * create chartModel for pie chart (#43549)
      
      * create chartModel for pie chart
      
      * render static pie chart (#43550)
      
      * render static pie chart
      
      * render static pie chart legend (#43551)
      
      * disable animation
      
      * alter static-viz pie chart be tests to account for echarts-impl
      
      The old implementation had a different implementation for legends, separate from the 'categorical/donut' js
      render. Echarts nicely combines the legend into the pie render, so we don't need to worry about that stuff anymore.
      
      Instead, I've written a simple set of assertions on the echarts pie implementation now.
      
      * Get rid of this test that was attempting to use old code path
      
      * echarts pie
      
      * One last spot where we don't need old pie stuff anymore.
      
      * add loki specs
      
      * save snapshots
      
      * fix small slices disappearing
      
      * update snapshots
      
      * add repro story for exteremely small slice
      
      * add snapshot
      
      * fix rounded total
      
      * fix percent formatting in legend
      
      * fix date dimension formatting
      
      * fix binned and relative date dimension labels on legend
      
      * add specs and snapshots for null and unaggregated dimensions
      
      * hide overlaping labels on chart
      
      * fix null dimension color
      
      * show error when metric column has a negative value
      
      * move legend to botom
      
      * make dot margin smaller
      
      * add columns to legend
      
      * sort legend vertically
      
      * dont use grid if only one row for legend
      
      * never hide legend in static viz
      
      * fix empty column culling
      
      * show single legend item
      
      * add long dimension name story
      
      * fix long dimension name in legend
      
      * right justify percentages in legend
      
      * remove negative error and re-add stories
      
      * handle negative values
      
      * create chart definition for dynamic pie chart
      
      * render chart with responsiveness
      
      * add comment for borderWidth calculation
      
      * center legend
      
      * fix legend centering
      
      * add story for missing currency formatting
      
      * fix missing currency formatting
      
      * fix graalvm crashing
      
      * fix column settings computation
      
      * add another currency formatting repro
      
      * fix wrong order of col settings computations
      
      * convert colors to hex
      
      * fix colors missing from viz settings
      
      * temp todo comment
      
      * fix colors in dynamic viz
      
      * update snapshots
      
      * fix crashing due to invalid dimension/metric setting
      
      * fix chart crashing for boolean dimension with labels on chart
      
      * add repro
      
      * fix regression in label formatting
      
      * fix labels on small slices
      
      * update specs
      
      * emphasis state for slice hover
      
      * recreate old label hiding logic
      
      * include height measurement in getIsLabelVisible
      
      * move d3 slices to chart model
      
      * fix labels on static viz
      
      * wip basic hover state and tooltip
      
      * fix emphasis style getting stuck by memoizing everything
      
      * update total display value
      
      * fix stuck emphasis by setting notMerge to false for pie only
      
      * handle other slice in tooltip
      
      * fix bugs in total graphic
      
      * use OTHER_SLICE_KEY const in static viz legend
      
      * implement legend and connect to hover state
      
      * implement click actions
      
      * fix slice not clickable
      
      * handle all zero slices
      
      * add repro
      
      * update specs
      
      * update pie_chart.cy.spec.js
      
      * update chart_drill.cy.spec.js
      
      * add repro for single column legend
      
      * use minimum 2 legend columns
      
      * fix legend text overlap
      
      * use more margin for single row legend
      
      * update specs
      
      * add repro for 28568
      
      * add repro for 38424
      
      * fix percent label not showing on large slices
      
      * hide total text when chart is small
      
      * replace comment about animations
      
      * show warning for mixed positive and negative values
      
      * delete old chart files
      
      * fix type errors
      
      * update d3 import
      
      * update specs
      
      * remove branch from uberjar.yml
      
      * dont put single slice into other
      
      * fix lint errors and pie render test
      
      * update more d3 imports
      
      * remove unused settings
      
      * revert preview-card-width change
      
      * remove unused import
      
      * remove majorWidth option from formatting
      
      * use debounceLeading refresh mode in ChartWithLegend
      
      * remove TOTAL_GRAPHIC_OPTION constant
      
      * delete unit test for pie chart
      
      * fix failing test by doing set comparison instead
      
      * fix typo in comment
      
      * remove SUNBURST_SERIES_OPTION constant
      
      * fix lint by removing unused eslint-disable
      
      * move default color computation to getValue
      
      * fix static pie test to show that we will always render the legend
      
      * update pie border color for night mode and embedding
      
      * fix styles for embedding case and add stories
      
      * skip embedding stories
      
      ---------
      
      Co-authored-by: default avatarAdam James <adam.vermeer2@gmail.com>
      Unverified
      4ec1fd88
  3. Jul 17, 2024
    • Mahatthana (Kelvin) Nomsawadi's avatar
      [Milestone 1] Re-design transparent theme for static embedding and public links (#45633) · ffa54f0f
      Mahatthana (Kelvin) Nomsawadi authored
      
      * refactor: Simplify code (#44275)
      
      * Remove dead code
      
      * Remove values same as default options
      
      * Simplify hook API: Removing unused argument
      
      * review: Remove redundant code
      
      * Update look and feel copy (#44277)
      
      * Update static embed tab name
      
      * Update copies + rearrange settings
      
      * Use Mantine Select
      
      * Fix E2E tests by applying new copies
      
      * Fix unit tests
      
      * Fix more E2E tests
      
      * review: Add a comment on Mantine `value` quirk
      
      * Adjust spacing and relevant tests
      
      * Move `transparent` theme to its own toggle option (#44362)
      
      * Reorder the function to match the visual order
      
      * Make function name consistent
      
      * Introduce the new background option (do nothing yet)
      
      * Remove redundant exports
      
      * Tighten up values to reduce confusion
      
      * Make the parameters order consistent
      
      * Only show background option on dashboads (spec)
      
      * Allow dashboard embed background to be transparent
      
      * Make filter background and header/footer transparent
      
      * Fix type error
      
      * Fix unit tests
      
      * Fix E2E tests
      
      * Fix checkerboard pattern not showing when no background
      
      * Add unit tests
      
      * Add missing copy update
      
      * Remove remnants from outdated solutions within the PR
      
      * Improve code comment references
      
      * Fix E2E tests since the last copy change
      
      * Fix type errors from merging master
      
      * Update light theme style (#44488)
      
      * Add background to dashboard filter on light theme
      
      * Make position sticky works with transparent background
      
      * Fix sticky filters not working on theme=transparent
      
      * Fix unit tests
      
      * Simplify IntersectionObserver components + fix E2E tests
      
      * Add storybook for embedded dashboard
      
      * Clarify the use of ExplicitSize context
      
      * Remove unused code
      
      * Formatting
      
      * Review: Better mock `isWithinIframe`
      
      * Update dark theme to match the new design (#45134)
      
      * Update light theme checkerboard colors
      
      * Update checkerboard colors
      
      * Consolidate dashboard light/dark border style
      
      * Use `--mb-color-text-primary` for light theme dashboard
      
      * Update embed dashboard dark theme primary color
      
      * Migrate dashboard text-secondary color
      
      * Migrate text-tertiary color
      
      * Migrate gold, axis, and split line to CSS custom properties
      
      * Fix failed e2e tests
      
      * Fix static viz not working
      
      * Update loki snapshots
      
      * Remove unnecessary CSS custom property
      
      * Make diff more consistent
      
      * Address review: reusing type
      
      * Support backward compatibility when passing `theme=transparent` (#45214)
      
      * Match preview query with the actual code query
      
      * Handle backward compatibility when `theme=transparent` on dashboard
      
      * Add unit tests
      
      * Address review: Make tests less repetitive
      
      * Update Metabase banner upsell UI (#45424)
      
      * Prepare folder for nested components
      
      * Update upsell UI
      
      - add `fullWidth` variant
      - align title to the left
      
      * Fix Upsell banner having horizontal scroll on full width
      
      * Add new Metabase banner upsell component
      
      * Fix unit tests
      
      * Address review: Fix typo
      
      Co-authored-by: default avatarRyan Laurie <30528226+iethree@users.noreply.github.com>
      
      * Address review: Move upsel UI to `admin/upsells`
      
      Co-authored-by: default avatarRyan Laurie <30528226+iethree@users.noreply.github.com>
      
      * Remove unnecessary ESLint disable comment
      
      We can remove it since the file is in admin folder, and is already excluded from the rule.
      
      * Address review: remove default value property
      
      Co-authored-by: default avatarDenis Berezin <denis.berezin@metabase.com>
      
      * Address review: Extract magic number
      
      ---------
      
      Co-authored-by: default avatarRyan Laurie <30528226+iethree@users.noreply.github.com>
      Co-authored-by: default avatarDenis Berezin <denis.berezin@metabase.com>
      
      * More UI updates (#45450)
      
      * Update dark theme text colors to match the new design
      
      * Update powered by metabase logo
      
      * Update loki snapshots
      
      * Fix unit tests
      
      * Fix formatting
      
      * Fix wrong dark theme metabase logo badge color
      
      * Address review: Compress SVG with svgo
      
      Co-authored-by: default avatarDenis Berezin <denis.berezin@metabase.com>
      
      * Fix E2E tests
      
      * Update loki snapshots
      
      * Clarify Metabase base colors with comments
      
      ---------
      
      Co-authored-by: default avatarDenis Berezin <denis.berezin@metabase.com>
      
      * Add more tests (#45628)
      
      * Add static embed question stories
      
      * Add loki snapshots
      
      * Add transparent theme for static dashboard tests
      
      * Add transparent theme tests for static questions
      
      * Assert `background` option in analytics tests
      
      * Remove tests for logic that has been moved
      
      * Update loki snapshots
      
      * Fix failed E2E tests from merging master
      
      ---------
      
      Co-authored-by: default avatarRyan Laurie <30528226+iethree@users.noreply.github.com>
      Co-authored-by: default avatarDenis Berezin <denis.berezin@metabase.com>
      Unverified
      ffa54f0f
  4. Jul 12, 2024
  5. Jul 11, 2024
  6. Jul 09, 2024
  7. Jul 08, 2024
  8. Jul 01, 2024
  9. Jun 28, 2024
  10. Jun 26, 2024
  11. Jun 25, 2024
  12. Jun 21, 2024
  13. Jun 20, 2024
    • Phoomparin Mano's avatar
      fix(sdk): font size, color and padding in viz (#44283) · dab2d852
      Phoomparin Mano authored
      * funnel start color should be text-dark
      
      * change pivot table font size unit to em for scaling
      
      * change funnel and legend item unit to em
      
      * change funnel font size to em
      
      * change object detail font size to em
      
      * change gauge font size to em
      
      * add cartesian chart padding config
      
      * update docs
      
      * remove isEmbeddingSdk prop
      
      * simulate the 0.875em base font size
      
      * chart padding override should apply in query builder
      
      * add cartesian padding to stories
      
      * update readme docs
      
      * fix collection browser option in readme docs
      
      * fix pivot table font size scaling
      
      * update loki
      
      * update loki
      
      * use em for smart scalar
      
      * update chart default padding
      
      * revert smart scalar font size scaling due to measurement
      
      * dynamic font family and font size as defaults
      
      * pivot table
      
      * add more properties to sdk docs
      
      * make FONT_SIZES constant local
      
      * link to discussion on query builder extra spacing
      
      * enforce that font is passed to getLeftHeaderWidths
      Unverified
      dab2d852
  14. Jun 17, 2024
  15. Jun 14, 2024
  16. Jun 13, 2024
  17. Jun 06, 2024
  18. Jun 05, 2024
    • Jesse Devaney's avatar
      Fix column scaling ("Multiply by a number") bugs (#43668) · 6ac4fe97
      Jesse Devaney authored
      * return empty string so non-empty labels do not get hidden by empty labels
      
      * fix function name
      
      * apply scaling in transformed dataset
      
      * add missing option to OptionsType
      
      * fix double scaling
      
      * add column scaling to waterfall transformed dataset
      
      * add column value scaling to dataset transform
      
      * fix stacked bar segment labels not responding to column scaling
      
      * fix tooltip values displayed
      
      * since scaling as added to transformedDataset, use transformedDataset for formatters
      
      * revert changes to display percentage instead of absolute value
      
      * fix stacked data labels
      
      * add loki variant for custom y-axis range with column scaling
      
      * fix stack segmented label formatters compact calculation
      
      * scale original dataset and use that instead of modifying transformedDataset
      
      * update loki snapshots
      
      * fix scatter plot dataset scaling
      
      * fix tooltip values being double scaled
      
      * add E2E test to validate behavior
      
      * add helper for not duplicating the column scaling
      
      * port multiple y-axis metrics with column scaling fixes to RowChart
      
      * add waterfall and scatterplot loki variants
      
      * fix type errors and failing unit tests
      
      * fix failing unit tests
      
      * update loki snapshots
      Unverified
      6ac4fe97
    • Aleksandr Lesnenko's avatar
      Set min bar height for non-zero bars (#43485) · f025758d
      Aleksandr Lesnenko authored
      * set min bar height for non-zero values
      
      * fix y-axis split logic uses transformed dataset instead of actual data
      Unverified
      f025758d
  19. Jun 04, 2024
    • Phoomparin Mano's avatar
      feat(sdk): font size scaling and adjustment for visualizations (#43264) · 9d61985f
      Phoomparin Mano authored
      * support test utilities in sdk import
      
      * add relative unit default chart font size in embedding defaults
      
      * make font size follow sdk root
      
      * feat(sdk): add font size settings to axis ticks
      
      * feat(sdk): add font size settings to series labels
      
      * re-add hasTimelineEvents from merge commits
      
      * apply default font size at the theme level
      
      * add table header cell font size
      
      * calculate cell font size based on 12.5px
      
      * rename theme.chart to theme.cartesian
      
      * refactor visualization theme
      
      * refactor default viz theme
      
      * remove chart style config
      
      * add goal line
      
      * pass font size to chart measurements
      
      * use px as reference unit
      
      * support row chart viz
      
      * add missing echarts font size
      
      * add table cell font sizes
      
      * use css variables for funnel color
      
      * fix theme type in smart scalar story
      
      * add bar chart to storybook for visual test
      
      * add line chart to storybook for visual test
      
      * add loki reference images
      
      * add loki reference images for row chart
      
      * add loki shared reference images to stories filter
      
      * update loki reference image
      
      * synchronize base font size
      
      * add theme provider to funnel test setup
      
      * add missing default visualization theme
      
      * add unit test for get size in px
      
      * update loki reference image
      
      * fix static viz build error
      Unverified
      9d61985f
  20. Jun 03, 2024
  21. Jun 01, 2024
    • Jesse Devaney's avatar
      Fix data labels too dense with large single series (#42985) · 72443c62
      Jesse Devaney authored
      
      * remove unused variable
      
      * conditionally render labels sparsely if large amount of data points
      
      * update loki snapshots
      
      * refactor data label formatter conditions
      
      * setup intelligent label plotting
      
      * handle the case when there are no labels
      
      * add sparse data label rendering to bar charts
      
      * do not compute if no labels need to be shown or hidden
      
      * add sparse data labeling to waterfall charts
      
      * adjustment for large series waterfall labels
      
      * revert change
      
      * refactor name
      
      * add sparse labels to stacked bar and area
      
      * improve scaleFactor
      
      * fix type errors
      
      * remove unused labelFormatter
      
      * update snapshots
      
      * patch ECharts
      
      - labels with no text, i.e. "", were still being considered as plot-able labels which was causing labels with real text "asdfec.." to be hidden because of overlap.
      - This patch makes it so that labels with no text, i.e. "", are not considered to be candidates for overlap checking.
      
      * update loki snapshots
      
      * only loop over dataset once for getWaterfallChartDataDensity
      
      * improve performance of chart data density calculations
      
      * update loki snapshots
      
      * update E2E spec
      
      * update E2E spec
      
      * increase cartesian label density allotment
      
      * update loki snapshots
      
      * update loki snapshots
      
      * comment out node_modules cache since it cannot be skipped by commit and is breaking CI
      
      * fix type errors
      
      * Reset node modules if patches are changed
      
      * refactor type naming
      
      ---------
      
      Co-authored-by: default avatarUladzimir Havenchyk <uladzimir.dev@gmail.com>
      Co-authored-by: default avatarUladzimir Havenchyk <125459446+uladzimirdev@users.noreply.github.com>
      Unverified
      72443c62
  22. May 30, 2024
  23. May 28, 2024
  24. May 24, 2024
  25. May 21, 2024
  26. May 17, 2024
    • Jesse Devaney's avatar
      Move series data label formatters from `option` to the `model` (#42616) · c747c170
      Jesse Devaney authored
      
      * move series data label formatters to the model
      
      - TODO: move stacked data label formatters to the model
      
      * combo stacked chart
      
      * spec
      
      * remove irrelevant spec
      
      * combo stacking
      
      * fix selecting y-axis on stacked charts
      
      * snapshot
      
      * linter, specs, types
      
      * propagate combo stacking to area and bar charts
      
      * enable combo stacking for bar/area charts, fix data transform
      
      * fix types, specs
      
      * fix y-axis extents calculations
      
      * remove spec that tested the removed control, update specs, update test data
      
      * propagate combo stacking to area and bar charts (#42600)
      
      * propagate combo stacking to area and bar charts
      
      * enable combo stacking for bar/area charts, fix data transform
      
      * fix types, specs
      
      * fix y-axis extents calculations
      
      * remove spec that tested the removed control, update specs, update test data
      
      * review
      
      * remove unused formatting options parameter
      
      * move stacked labels formatter to model
      
      * fix stacked combo chart label display for non-stacked lines
      
      * combo stacked chart
      
      * spec
      
      * remove irrelevant spec
      
      * combo stacking
      
      * fix selecting y-axis on stacked charts
      
      * snapshot
      
      * linter, specs, types
      
      * propagate combo stacking to area and bar charts (#42600)
      
      * propagate combo stacking to area and bar charts
      
      * enable combo stacking for bar/area charts, fix data transform
      
      * fix types, specs
      
      * fix y-axis extents calculations
      
      * remove spec that tested the removed control, update specs, update test data
      
      * review
      
      * fix waterfall chart labels
      
      ---------
      
      Co-authored-by: default avatarAleksandr Lesnenko <alxnddr@gmail.com>
      Co-authored-by: default avatarAleksandr Lesnenko <alxnddr@users.noreply.github.com>
      Unverified
      c747c170
  27. May 16, 2024
    • Aleksandr Lesnenko's avatar
      combo stacked chart (#42085) · 8b9e1526
      Aleksandr Lesnenko authored
      * combo stacked chart
      
      * spec
      
      * remove irrelevant spec
      
      * combo stacking
      
      * fix selecting y-axis on stacked charts
      
      * snapshot
      
      * linter, specs, types
      
      * propagate combo stacking to area and bar charts (#42600)
      
      * propagate combo stacking to area and bar charts
      
      * enable combo stacking for bar/area charts, fix data transform
      
      * fix types, specs
      
      * fix y-axis extents calculations
      
      * remove spec that tested the removed control, update specs, update test data
      
      * review
      
      * show show data values setting on normalized charts that have a line series
      
      * fixes
      Unverified
      8b9e1526
  28. May 14, 2024
  29. May 06, 2024
  30. May 03, 2024
Loading