forked from uber/react-vis
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathindex.js
314 lines (283 loc) · 11 KB
/
index.js
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
// Copyright (c) 2016 - 2017 Uber Technologies, Inc.
//
// Permission is hereby granted, free of charge, to any person obtaining a copy
// of this software and associated documentation files (the "Software"), to deal
// in the Software without restriction, including without limitation the rights
// to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
// copies of the Software, and to permit persons to whom the Software is
// furnished to do so, subject to the following conditions:
//
// The above copyright notice and this permission notice shall be included in
// all copies or substantial portions of the Software.
//
// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
// THE SOFTWARE.
import sourceLinker from './showcase-components/source-linker';
import {SHOWCASE_LINKS} from './showcase-links';
import ComplexChart from './plot/complex-chart';
import LineChart from './plot/line-chart';
import LineChartManyColors from './color/line-chart-many-colors';
import LineChartCanvas from './plot/line-chart-canvas';
import LineChartWithStyle from './plot/line-chart-with-style';
import LineMarkChart from './plot/linemark-chart';
import LineSeriesCanvasNearestXYExample from './plot/line-series-canvas-nearest-xy-example';
import BarChart from './plot/bar-chart';
import BigBaseBarChart from './plot/big-base-bar-chart';
import DifferenceChart from './plot/difference-chart';
import StackedVerticalBarChart from './plot/stacked-vertical-bar-chart';
import StackedHorizontalBarChart from './plot/stacked-horizontal-bar-chart';
import ClusteredStackedVerticalBarChart from './plot/clustered-stacked-bar-chart';
import StackedHistogram from './plot/stacked-histogram';
import Histogram from './plot/histogram';
import AreaChart from './plot/area-chart';
import AreaChartElevated from './plot/area-chart-elevated';
import ScatterplotChart from './plot/scatterplot';
import WhiskerChart from './plot/whisker-chart.js';
import CustomSVGExample from './plot/custom-svg-example';
import CustomSVGRootLevel from './plot/custom-svg-root-level';
import CustomSVGAllTheMarks from './plot/custom-svg-all-the-marks';
import FauxScatterplotChart from './plot/faux-radial-scatterplot';
import ScatterplotCanvas from './plot/scatterplot-canvas';
import HeatmapChart from './plot/heatmap-chart';
import HexHeatmap from './plot/hex-heatmap';
import HexbinSizeExample from './plot/hexbin-size-example';
import LabeledHeatmap from './plot/labeled-heatmap';
import ContourSeriesExample from './plot/contour-series-example';
import WidthHeightMarginChart from './plot/width-height-margin';
import CustomScales from './plot/custom-scales';
import AxisWithTurnedLabels from './plot/axis-with-turned-labels';
import MixedStackedChart from './plot/mixed-stacked-chart';
import GridLinesChart from './plot/grid';
import EnergySankey from './sankey/energy-sankey';
import VornoiSankey from './sankey/voronoi';
import BasicSankey from './sankey/basic';
import {
SensibleDefaults,
ColorInXYPlot,
ColorSpecificity,
CategoryColorAtMarkLevel,
CategoryColorAtMarkLevelCustomPalette,
CategoryColorAtMarkLevelFixedStroke,
GradientCharts,
LinearColorAtMarkLevel,
LinearColorAtMarkLevelNoPalette,
LineSeriesMarkSeries,
LiteralColorAtMarkLevel,
CategoryColorAtSeriesLevel,
LinearColorAtSeriesLevel,
LiteralColorAtSeriesLevel,
ReactVis5,
ReactVis20,
Continuous,
CustomPalette
} from './color/mini-color-examples';
import {MiniCharts} from './data/mini-data-examples';
import {
LineChartMouseOverSeries,
LineChartMouseOverXY,
LinkedCharts,
ScatterPlotOnNearestXY
} from './interaction/interaction-examples';
import {FlexibleCharts} from './flexible/flexible-examples';
import AxisOn0 from './axes/axis-on-0';
import CustomAxesOrientation from './axes/custom-axes-orientation';
import CustomAxisChart from './axes/custom-axis';
import CustomAxisTickFormat from './axes/custom-axis-tick-format';
import CustomAxisTickElement from './axes/custom-axis-tick-element';
import CustomAxes from './axes/custom-axes';
import DecorativeAxisCrissCross from './axes/decorative-axes-criss-cross';
import EmptyChart from './axes/empty-chart';
import StaticHints from './axes/static-hints';
import DynamicHints from './axes/dynamic-hints';
import DynamicComplexEdgeHints from './axes/dynamic-complex-edge-hints';
import DynamicSimpleEdgeHints from './axes/dynamic-simple-edge-hints';
import DynamicSimpleTopEdgeHints from './axes/dynamic-simple-topedge-hints';
import DynamicProgrammaticRightEdgeHints from './axes/dynamic-programmatic-rightedge-hints';
import DynamicCrosshair from './axes/dynamic-crosshair';
import DynamicCrosshairScatterplot from './axes/dynamic-crosshair-scatterplot';
import PaddedAxis from './axes/padded-axis';
import ParallelCoordinatesExample from './axes/parallel-coordinates-example';
import StaticCrosshair from './axes/static-crosshair';
import VerticalDiscreteColorLegendExample from './legends/vertical-discrete-color';
import HorizontalDiscreteColorLegendExample from './legends/horizontal-discrete-color';
import SearchableDiscreteColorLegendExample from './legends/searchable-discrete-color';
import ContinuousColorLegendExample from './legends/continuous-color';
import ContinuousSizeLegendExample from './legends/continuous-size';
import HorizontalDiscreteCustomPalette from './legends/horizontal-discrete-custom-palette';
import AnimationExample from './misc/animation-example';
import LabelSeriesExample from './misc/label-series-example';
import GradientExample from './misc/gradient-example';
import NullDataExample from './misc/null-data-example';
import SyncedCharts from './misc/synced-charts';
import TimeChart from './misc/time-chart';
import TriangleExample from './misc/triangle-example';
import VoronoiLineChart from './misc/voronoi-line-chart';
import ZoomableChartExample from './misc/zoomable-chart-example';
import SelectionPlotExample from './misc/selection-plot-example';
import DragableChartExample from './misc/dragable-chart-example';
import BidirectionDragChart from './misc/2d-dragable-plot';
import SimpleRadialChart from './radial-chart/simple-radial-chart';
import DonutChartExample from './radial-chart/donut-chart';
import CustomRadiusRadialChart from './radial-chart/custom-radius-radial-chart';
import GradientPie from './radial-chart/gradient-pie';
import ArcSeriesExample from './radial-chart/arc-series-example';
import BasicRadarChart from './radar-chart/basic-radar-chart';
import AnimatedRadarChart from './radar-chart/animated-radar-chart';
import FourQuadrantRadarChart from './radar-chart/four-quadrant-radar-chart';
import RadarChartWithTooltips from './radar-chart/radar-chart-with-tooltips';
import RadarChartSeriesTooltips from './radar-chart/radar-chart-series-tooltips';
import BasicParallelCoordinates from './parallel-coordinates/basic-parallel-coordinates';
import AnimatedParallelCoordinates from './parallel-coordinates/animated-parallel-coordinates';
import BrushedParallelCoordinates from './parallel-coordinates/brushed-parallel-coordinates';
import BasicSunburst from './sunbursts/basic-sunburst';
import ClockExample from './sunbursts/clock-example';
import AnimatedSunburst from './sunbursts/animated-sunburst';
import SunburstWithTooltips from './sunbursts/sunburst-with-tooltips';
import BasicSankeyExample from './sankey/basic';
import VoronoiSankeyExample from './sankey/voronoi';
import EnergySankeyExample from './sankey/energy-sankey';
import LinkEventSankeyExample from './sankey/link-event';
import LinkHintSankeyExample from './sankey/link-hint';
import SimpleTreemap from './treemap/simple-treemap';
import TreemapExample from './treemap/dynamic-treemap';
const mainShowCase = {
AxisOn0,
ComplexChart,
LineChart,
LineChartManyColors,
LineChartCanvas,
LineChartWithStyle,
LineMarkChart,
LineSeriesCanvasNearestXYExample,
BarChart,
BigBaseBarChart,
DifferenceChart,
StackedVerticalBarChart,
MixedStackedChart,
StackedHorizontalBarChart,
ClusteredStackedVerticalBarChart,
StackedHistogram,
Histogram,
AnimationExample,
AreaChart,
AreaChartElevated,
FauxScatterplotChart,
CustomSVGExample,
CustomSVGRootLevel,
CustomSVGAllTheMarks,
ScatterplotChart,
ScatterplotCanvas,
WhiskerChart,
HeatmapChart,
HexHeatmap,
HexbinSizeExample,
LabeledHeatmap,
ContourSeriesExample,
WidthHeightMarginChart,
CustomScales,
CustomAxesOrientation,
CustomAxisChart,
CustomAxisTickFormat,
CustomAxisTickElement,
AxisWithTurnedLabels,
GridLinesChart,
StaticHints,
DecorativeAxisCrissCross,
DynamicHints,
DynamicComplexEdgeHints,
DynamicSimpleEdgeHints,
DynamicSimpleTopEdgeHints,
DynamicProgrammaticRightEdgeHints,
EmptyChart,
StaticCrosshair,
DynamicCrosshair,
DynamicCrosshairScatterplot,
PaddedAxis,
ParallelCoordinatesExample,
SyncedCharts,
TimeChart,
TriangleExample,
VoronoiLineChart,
CustomAxes,
LabelSeriesExample,
GradientExample,
NullDataExample,
ZoomableChartExample,
SelectionPlotExample,
DragableChartExample,
BidirectionDragChart,
SensibleDefaults,
ColorInXYPlot,
ColorSpecificity,
CategoryColorAtMarkLevel,
CategoryColorAtMarkLevelCustomPalette,
CategoryColorAtMarkLevelFixedStroke,
GradientCharts,
LinearColorAtMarkLevel,
LinearColorAtMarkLevelNoPalette,
LineSeriesMarkSeries,
LiteralColorAtMarkLevel,
CategoryColorAtSeriesLevel,
LinearColorAtSeriesLevel,
LiteralColorAtSeriesLevel,
ReactVis5,
ReactVis20,
Continuous,
CustomPalette,
MiniCharts,
FlexibleCharts,
LineChartMouseOverSeries,
LineChartMouseOverXY,
LinkedCharts,
ScatterPlotOnNearestXY,
SimpleTreemap,
TreemapExample,
AnimatedSunburst,
BasicSunburst,
ClockExample,
SunburstWithTooltips,
SimpleRadialChart,
DonutChartExample,
CustomRadiusRadialChart,
GradientPie,
ArcSeriesExample,
AnimatedRadarChart,
BasicRadarChart,
FourQuadrantRadarChart,
RadarChartWithTooltips,
RadarChartSeriesTooltips,
BasicParallelCoordinates,
AnimatedParallelCoordinates,
BrushedParallelCoordinates,
BasicSankeyExample,
VoronoiSankeyExample,
EnergySankeyExample,
LinkEventSankeyExample,
LinkHintSankeyExample,
VerticalDiscreteColorLegendExample,
HorizontalDiscreteColorLegendExample,
HorizontalDiscreteCustomPalette,
SearchableDiscreteColorLegendExample,
ContinuousColorLegendExample,
ContinuousSizeLegendExample,
EnergySankey,
BasicSankey,
VornoiSankey
};
const showCaseWithLinks = Object.keys(mainShowCase).reduce(
(acc, showCaseExample) => {
const link = SHOWCASE_LINKS[showCaseExample];
acc[`${showCaseExample}WithLink`] = sourceLinker(
mainShowCase[showCaseExample],
link
);
return acc;
},
{}
);
export const showCase = {...mainShowCase, ...showCaseWithLinks};