Skip to content
This repository has been archived by the owner on Dec 10, 2021. It is now read-only.

feat(chart): Add <ChartDataProvider /> #120

Merged
merged 33 commits into from
Mar 19, 2019
Merged
Changes from 1 commit
Commits
Show all changes
33 commits
Select commit Hold shift + click to select a range
f8a2012
docs: [demo][connection] add ConfigureCORS story for testing CORS
Mar 13, 2019
d850f4f
docs: [demo][ConfigureCORS] better instructions
Mar 13, 2019
38881c2
docs: better CORS story, update webpack for @babel/polyfill
Mar 15, 2019
627a4d3
feat: [chart] add mvp DataProvider component
Mar 13, 2019
2affec1
docs: [chart] add DataProvider story with WordCloudPlugin
Mar 13, 2019
9ea2431
docs: [chart] add DataProvider deets to Readme
Mar 13, 2019
663a855
test(chart): move SuperChart.test.jsx => .tsx and instead use @ts-ignore
Mar 15, 2019
b6bd564
fix(connection): point interface.request to client.request
Mar 15, 2019
627cce8
feat(chart): re-write DataProvider as ChartDataProvider
Mar 15, 2019
5a1172b
docs(demo): re-write LegacyWordCloudStories => ChartDataProviderStories
Mar 15, 2019
7a985a9
refactor(chart): use IDENTITY as ChartPlugin buildQuery default
Mar 15, 2019
fe36916
feat(chart): support legacy + v1 loadQueryData endpoints in ChartClient
Mar 15, 2019
71c0358
docs(demo): add sankey + sunburst plugins to ChartDataProvider story
Mar 15, 2019
df883c3
style(chart): run prettier on SuperChart
Mar 15, 2019
41d8721
feat(chart): export QueryData type from models/ChartProps
Mar 15, 2019
0e484f5
feat(chart): export Metrics and BaseFormData from types/ChartFormData
Mar 15, 2019
ab45927
feat(chart): add request option overrides in ChartDataProvider
Mar 15, 2019
9ab6493
fix(chart): use Partial<> for ChartClient request option overrides
Mar 15, 2019
48aa187
test(chart): add ChartDataProvider tests
Mar 15, 2019
1301bcc
build: include demo pkg in type script
Mar 18, 2019
20e2a44
build: move storybook/mocks to test/fixtures
Mar 18, 2019
16b1b2b
build: move json-bigint TS declaration to root
Mar 18, 2019
1215b39
test(chart): clean up ChartDataProvider test TS
Mar 18, 2019
9240730
chore(chart): lint fix SuperChart
Mar 18, 2019
dc2be64
fix(chart): set ChartPlugin.buildQuery default back to undefined
Mar 18, 2019
524aaae
test(connection): fix expected Client.get call count
Mar 18, 2019
50a002d
test(chart): fix ChartClient tests and add test for legacy API
Mar 18, 2019
8392736
fix(chart): uninitialized typo, change fetching => loading
Mar 18, 2019
af3e0f0
docs(chart): update README to final ChartDataProvider API
Mar 18, 2019
14e9994
docs(chart): fix typo
Mar 18, 2019
c5a5010
test(chart): get ChartDataProvider to one hundo
Mar 18, 2019
24b8f7b
feat(chart): add and export more meaningful Datasource type
Mar 19, 2019
11f7227
feat(chart): use Datasource type in ChartClient
Mar 19, 2019
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
Prev Previous commit
Next Next commit
fix(chart): set ChartPlugin.buildQuery default back to undefined
Chris Williams committed Mar 18, 2019
commit dc2be644ae4766744f212a0c0c323c2784e20d17
4 changes: 2 additions & 2 deletions packages/superset-ui-chart/src/models/ChartPlugin.ts
Original file line number Diff line number Diff line change
@@ -47,15 +47,15 @@ export default class ChartPlugin<T extends ChartFormData = ChartFormData> extend
super();
const {
metadata,
buildQuery = IDENTITY,
buildQuery,
loadBuildQuery,
transformProps = IDENTITY,
loadTransformProps,
Chart,
loadChart,
} = config;
this.metadata = metadata;
this.loadBuildQuery = loadBuildQuery || (() => buildQuery);
this.loadBuildQuery = loadBuildQuery || (buildQuery ? () => buildQuery : undefined);
this.loadTransformProps = loadTransformProps || (() => transformProps);

if (loadChart) {
Original file line number Diff line number Diff line change
@@ -38,7 +38,7 @@ describe('ChartPlugin', () => {
expect(plugin).toBeInstanceOf(ChartPlugin);
});
describe('buildQuery', () => {
it('defaults to identity function', () => {
it('defaults to undefined', () => {
const plugin = new ChartPlugin({
metadata,
Chart: FakeChart,