Skip to content

Commit

Permalink
feat(legacy-plugin-chart-event-flow): migrate package (#514)
Browse files Browse the repository at this point in the history
  • Loading branch information
kristw authored and zhaoyongjie committed Nov 26, 2021
1 parent ddc8ac9 commit ae6a1bb
Show file tree
Hide file tree
Showing 13 changed files with 392 additions and 51 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -29,6 +29,7 @@
},
"homepage": "https://github.com/apache-superset/superset-ui#readme",
"dependencies": {
"@data-ui/event-flow": "^0.0.84",
"@storybook/addon-actions": "^5.3.18",
"@storybook/addon-info": "^5.3.18",
"@storybook/addon-knobs": "^5.3.18",
Expand All @@ -42,6 +43,7 @@
"@superset-ui/legacy-plugin-chart-calendar": "0.13.6",
"@superset-ui/legacy-plugin-chart-chord": "0.13.13",
"@superset-ui/legacy-plugin-chart-country-map": "0.13.3",
"@superset-ui/legacy-plugin-chart-event-flow": "^0.11.15",
"@superset-ui/legacy-plugin-chart-force-directed": "0.13.16",
"@superset-ui/legacy-plugin-chart-heatmap": "0.13.16",
"@superset-ui/legacy-plugin-chart-histogram": "0.13.16",
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,30 @@
import React from 'react';
import { SuperChart } from '@superset-ui/chart';
import sampleEvents from '@data-ui/event-flow/build/sampleEvents';
import EventFlowChartPlugin from '@superset-ui/legacy-plugin-chart-event-flow';

new EventFlowChartPlugin().configure({ key: 'event-flow' }).register();

export default {
title: 'Legacy Chart Plugins|legacy-plugin-chart-event-flow',
};

const data = sampleEvents.twentyUsers.allEvents.map(({ ENTITY_ID, EVENT_NAME, TS }) => ({
__timestamp: TS,
eventName: EVENT_NAME,
userId: ENTITY_ID,
}));

export const basic = () => (
<SuperChart
chartType="event-flow"
width={400}
height={400}
queryData={{ data }}
formData={{
allColumnsX: 'eventName',
entity: 'userId',
minLeafNodeEventCount: 1,
}}
/>
);

This file was deleted.

This file was deleted.

0 comments on commit ae6a1bb

Please sign in to comment.