Commit Graph

38 Commits

Author SHA1 Message Date
Dan Goldin
86514207a3
Fix TypeScript warning: integet -> integer typo (#5637) 2021-11-15 15:43:51 -06:00
Levko Kravets
7445080d1a
Use Yarn instead of NPM (#5541) 2021-08-02 13:16:33 +03:00
Rafael Wendel
a61a25dd32
Run prettier (#5436)
* run in /client

* run in /viz-lib

* bug: fix wrong line ts expect error

* bug: fixed search pattern for prettier
2021-03-31 16:44:19 -03:00
Gabriel Dutra
fa8b24ea01
Prepare viz-lib release with Antd v4 (#5443) 2021-03-30 16:06:35 -03:00
dependabot[bot]
911f398006
Bump bl from 1.2.2 to 1.2.3 in /viz-lib (#5257)
Bumps [bl](https://github.com/rvagg/bl) from 1.2.2 to 1.2.3.
- [Release notes](https://github.com/rvagg/bl/releases)
- [Commits](https://github.com/rvagg/bl/compare/v1.2.2...v1.2.3)

Signed-off-by: dependabot[bot] <support@github.com>

Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2021-01-25 16:52:14 -03:00
dependabot[bot]
b0b1d6c81c
Bump dompurify from 2.0.8 to 2.0.17 in /viz-lib (#5326)
Bumps [dompurify](https://github.com/cure53/DOMPurify) from 2.0.8 to 2.0.17.
- [Release notes](https://github.com/cure53/DOMPurify/releases)
- [Commits](https://github.com/cure53/DOMPurify/compare/2.0.8...2.0.17)

Signed-off-by: dependabot[bot] <support@github.com>

Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2021-01-25 13:44:11 -03:00
Rafael Wendel
7d33af4343
Fix inconsistent Sankey behavior (#5286)
* added type casting to coerce number string into nuber

* Merge branch 'master' into fix-inconsistent=sankey-behavior

* typed map viz options

* Partially typed what was possible

* reworked data coercion

* improved MapOptionsType types

* readaqueted sankey rows so as to allow strings again
2021-01-12 23:54:14 -03:00
Rafael Wendel
84c2abed59
Add reorder to dashboard parameter widgets (#5267)
* added paramOrder prop

* minor refactor

* moved logic to widget

* Added paramOrder to widget API call

* Update client/app/components/dashboards/dashboard-widget/VisualizationWidget.jsx

Co-authored-by: Gabriel Dutra <nesk.frz@gmail.com>

* Merge branch 'master' into reorder-dashboard-parameters

* experimental removal of helper element

* cleaner comment

* Added dashboard global params logic

* Added backend logic for dashboard options

* Removed testing leftovers

* removed appending sortable to parent component behavior

* Revert "Added backend logic for dashboard options"

This reverts commit 41ae2ce4755a6fa03fd76d900819b11016919275.

* Re-structured backend options

* removed temporary edits

* Added dashboard/widget param reorder cypress tests

* Separated edit and sorting permission

* added options to public dashboard serializer

* Removed undesirable events from drag

* Bring back attaching sortable to its parent

This reverts commit 163fb6fef5ecf7ec9924d5ff2dddcb4d889caab8.

* Added prop to control draggable destination parent

* Removed paramOrder fallback

* WIP (for Netflify preview)

* fixup! Added prop to control draggable destination parent

* Better drag and drop styling and fix for the padding

* Revert "WIP (for Netflify preview)"

This reverts commit 433e11edc353b645410bac4bc162819ffd37d89a.

* Improved dashboard parameter Cypress test

* Standardized reorder styling

* Changed dashboard param reorder to edit mode only

* fixup! Improved dashboard parameter Cypress test

* fixup! Improved dashboard parameter Cypress test

* Fix for Cypress CI error

Co-authored-by: Gabriel Dutra <nesk.frz@gmail.com>
2021-01-11 15:18:50 -03:00
Elad Ossadon
c290864ccd
Convert viz-lib to TypeScript (#5310)
Co-authored-by: ts-migrate <>
2020-12-15 18:21:37 -08:00
Gabriel Dutra
fa7ecca485
Frontend updates from internal fork (#5259)
* DynamicComponent for QuerySourceAlerts

* General Settings updates

* Dynamic Date[Range] updates

* EmptyState updates

* Query and SchemaBrowser updates

* Adjust page headers and add disablePublish

* Policy updates

* Separate Home FavoritesList component

* Update FormatQuery

* Autolimit frontend fixes

* Misc updates

* Keep registering of QuerySourceDropdown

* Undo changes in DynamicComponent

* Change sql-formatter package.json syntax

* Allow opening help trigger in new tab

* Don't run npm commands as root in Dockerfile

* Cypress: Remove extra execute query
2020-11-10 14:59:15 +02:00
deecay
8f484706b1
Enable Boxplot to be horizontal (#5262) 2020-11-08 23:17:08 +02:00
Rafael Wendel
8a6524c1ba
Add horizontal bar chart (#5154)
* added bar chart boilerplate

* added x/y manipulation

* replaced x/y management to inner series preparer

* added tests

* moved axis inversion to all charts series

* removed line and area

* inverted labels ui

* removed normalizer check, simplified inverted axes check

* finished working hbar

* minor review

* added conditional title to YAxis

* generalized horizontal chart for line charts, resetted state on globalSeriesType change

* fixed updates

* fixed updates to layout

* fixed minor issues

* removed right Y axis when axes inverted

* ran prettier

* fixed updater function conflict and misuse of getOptions

* renamed inverted to swapped

* created mappingtypes for swapped columns

* removed unused import

* minor polishing

* improved series behaviour in h-bar

* minor fix

* added basic filter to ChartTypeSelect

* final setup of filtered chart types

* Update viz-lib/src/components/visualizations/editor/createTabbedEditor.jsx

* added proptypes and renamed ChartTypeSelect props

* Add missing import

* fixed import, moved result array to global scope

* merged import

* clearer naming in ChartTypeSelect

* better lodash map syntax

* fixed global modification

* moved result inside useMemo

Co-authored-by: Gabriel Dutra <nesk.frz@gmail.com>
Co-authored-by: Levko Kravets <levko.ne@gmail.com>
2020-10-15 21:34:38 +03:00
Gabriel Dutra
9097feb100
Frontend updates from internal fork (#5209) 2020-10-15 14:25:22 -03:00
Gabriel Dutra
c821cab4cb
Generate Code Coverage report for Cypress (#5137) 2020-09-28 21:43:04 -03:00
Levko Kravets
4fb77867b0
Align Y axes at zero (#5053)
* Align Y axes as zero

* Fix typo (with @deecay)

* Add alignYAxesAtZero function

* Avoid 0 division

Co-authored-by: Gabriel Dutra <nesk.frz@gmail.com>
2020-09-28 13:12:40 +03:00
Levko Kravets
a473611cb0
Some Choropleth improvements/refactoring (#5186)
* Directly map query results column to GeoJSON property

* Use cache for geoJson requests

* Don't handle bounds changes while loading geoJson data

* Choropleth: fix map "jumping" on load; don't save bounds if user didn't edit them; refine code a bit

* Improve cache

* Optimize Japan Perfectures map (remove irrelevant GeoJson properties)

* Improve getOptions for Choropleth; remove unused code

* Fix test

* Add US states map

* Convert USA map to Albers projection

* Allow to specify user-friendly field names for maps
2020-09-24 14:39:09 +03:00
Gabriel Dutra
32b41e4112
Misc frontend changes from internal fork (#5143) 2020-09-04 08:00:30 -03:00
Levko Kravets
681b2f1abd
Introduce Link component (#5122)
* Introduce Link component

* Use Link component for external links as well

* Remove unused file (I hope it's really not needed)

* Use Link component in visualizations library

* Simplify Link component implementation

* CR1

* Trigger build

* CR2
2020-08-30 15:33:38 +03:00
Gabriel Dutra
a31196aef8
Upgrade Ant Design to v4 (#5068) 2020-08-25 14:24:15 -03:00
peterlee
83c6a6bcd2
Make table visualization header fixed (#5103)
* add lock table header

* Move styling to a new class

* Update renderer.less

* Move class to table and fix top border

* Update renderer.less

* Update viz-lib/src/visualizations/table/renderer.less

Thanks, this change is good to me.

Co-authored-by: Gabriel Dutra <nesk.frz@gmail.com>

Co-authored-by: Gabriel Dutra <nesk.frz@gmail.com>
2020-08-17 09:26:34 -03:00
Levko Kravets
eb603f63f0
Bar chart with second y axis overlaps data series (#4150) 2020-08-05 20:28:03 +03:00
Levko Kravets
a1255b4144
Fix wrong Y-axis range for stacked bar chart (#5029)
* getredash/redash#5026 Fix wrong Y-axis range for stacked bar chart

* Update tests

* Use Plotly's built-in algorinthm to compute Y-axis range

* Update tests

* Revert previous solution (yRange-related code)

* Revert other unrelated changes

* Revert other unrelated changes

* Move chart rendering to own file and ensure that rendering steps will occur in necessary order

* Reduce amount of plot updates by mergin separate updates into a sigle cumulative update

* Give better names for several functions
2020-07-17 11:28:15 +03:00
dependabot[bot]
6c349ea70a
Bump lodash from 4.17.15 to 4.17.19 in /viz-lib (#5051)
Bumps [lodash](https://github.com/lodash/lodash) from 4.17.15 to 4.17.19.
- [Release notes](https://github.com/lodash/lodash/releases)
- [Commits](https://github.com/lodash/lodash/compare/4.17.15...4.17.19)

Signed-off-by: dependabot[bot] <support@github.com>

Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2020-07-16 22:41:16 -03:00
Levko Kravets
6f9e79c641
getredash/redash#5031 Counter is too large on Query View/Source pages (#5044) 2020-07-14 21:56:01 +03:00
Levko Kravets
81e7c72d48
Allow to change order of legend items (#5021)
* Allow to change order of legend items

* Update tests
2020-07-13 19:08:51 +03:00
Gabriel Dutra
328f0f3f0c
Visualizations Library: Enhance docs (#4946) 2020-07-12 12:36:03 -03:00
Levko Kravets
c6be5758ad
Y-axis autoscale fails when min or max is set (#4904)
* getredash/redash#4784 Y-axis autoscale fails when min or max is set

* Update tests

Co-authored-by: Gabriel Dutra <nesk.frz@gmail.com>
2020-07-02 20:33:20 +03:00
Gabriel Dutra
a7edbf1e8d
Handle React exception when a function is provided (#5016) 2020-07-01 22:53:42 -03:00
Daniel Lang
68b70ed63b
Fixed broken custom JS visualization settings (#5013) 2020-07-01 01:22:07 -03:00
Gabriel Dutra
56df870f39
Plotly Charts: use .legend to determine legends size (#4935)
* Plotly Charts: use .bg to determine legends size

* Test: remove hack for legend below plotly

* Revert "Test: remove hack for legend below plotly"

This reverts commit d8efb0c03292df5ddea9cc43bee0f38b8924d00b.

* Use .legend to calculate bounds

* Also update plots without legend
2020-06-11 12:30:55 +03:00
Gabriel Dutra
bdb62365b1
Fix Sankey issue to render 1 and 5 stages (#4965)
* Sankey: Make sure last stage has "Exit"

* Sankey: Use 2 as min stage width size to render

* Use null instead of "Exit"

* Add comment about corresponding exit node

* Add multiple stages on Cypress test
2020-06-11 12:28:45 +03:00
Arik Fraimovich
43e5c2aa11
Fix: auto hide Plotly Modebar (#4930)
* Only set value for displayModeBar if we want to hide it

* Update viz-lib/src/visualizations/chart/Renderer/PlotlyChart.jsx
2020-05-31 21:18:52 +03:00
Levko Kravets
38dd3ff248
Fix flaky Map (Markers) tests (#4915)
* Fix flaky Map (Markers) tests

* Fix flaky Choropleth tests
2020-05-26 10:57:08 +03:00
Gabriel Dutra
6bac19c1e4
Use Antd Descriptions on Details visualization (#4914)
* Use Antd Descriptions for Details visualization

* Update styling

* Add some spacing to pagination
2020-05-26 09:52:03 +03:00
Levko Kravets
f4c9d7db1a
getredash/redash#4692 When resizing chart to a certain size it errors out (#4907) 2020-05-24 11:17:25 +03:00
Arik Fraimovich
ec68e8bba3
Fix: table viz crashing when search is enabled (#4899)
* Fix: table viz crashing when search is enabled

* Replace that weird hack with more controlled code

* Don't clear search input, apply search when data changes

Co-authored-by: Levko Kravets <levko.ne@gmail.com>
2020-05-21 11:13:36 +03:00
Levko Kravets
dc49585320
Add option to explicitly set chart legend position (#4865)
* Add option to explicitly set chart legend position

* Revert some chanes in order to fix tests

* Leave only "auto" and "below the plot" legend placement options

* Move Show legend checkbox to select; fix spelling
2020-05-07 17:21:31 +03:00
Gabriel Dutra
fc246aafc4
Separate visualizations into their own package (#4837)
* Add visualizations project settings

* Move visualizations to redash-visualizations

* Delete shared components

* Remove antd from deps

* Remove p-r-5 from table utils

* Remove visualization deps from package.json

* Rename package and change its version

* Test preinstall script

* Update Dockerfile build for frontend

* Test adding dockerignore

* Update jest tests

* Add step for jest tests

* Include viz-lib on dev commands

* User prettier v1 for now

* Delete unused libs on the app

* Add readme draft (to be finished)

* Add getOptions to Editor

* Add required libraries and finish basic example

* Bump version
2020-05-06 10:49:15 +03:00