@react-fabric/chart 1.0.0-beta.51 → 1.0.0-beta.52
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/cjs/charts/ActivityMap.js +22 -1
- package/dist/cjs/charts/CountSeries.js +27 -1
- package/dist/cjs/charts/DataSeries.js +26 -1
- package/dist/cjs/charts/Generic.js +14 -0
- package/dist/cjs/charts/MapSeries.js +24 -1
- package/dist/cjs/charts/TimeSeries.js +24 -1
- package/dist/cjs/charts/TimeSlider.js +21 -1
- package/dist/cjs/charts/WordBubble.js +25 -1
- package/dist/esm/charts/ActivityMap.js +22 -1
- package/dist/esm/charts/CountSeries.js +27 -1
- package/dist/esm/charts/DataSeries.js +26 -1
- package/dist/esm/charts/Generic.js +14 -0
- package/dist/esm/charts/MapSeries.js +24 -1
- package/dist/esm/charts/TimeSeries.js +24 -1
- package/dist/esm/charts/TimeSlider.js +21 -1
- package/dist/esm/charts/WordBubble.js +25 -1
- package/dist/types/charts/ActivityMap.d.ts +22 -1
- package/dist/types/charts/CountSeries.d.ts +27 -1
- package/dist/types/charts/DataSeries.d.ts +26 -1
- package/dist/types/charts/Generic.d.ts +13 -0
- package/dist/types/charts/MapSeries.d.ts +24 -1
- package/dist/types/charts/TimeSeries.d.ts +24 -1
- package/dist/types/charts/TimeSlider.d.ts +21 -1
- package/dist/types/charts/WordBubble.d.ts +25 -1
- package/dist/types/types/world.svg.d.ts +1 -1
- package/package.json +4 -4
- package/src/charts/ActivityMap.tsx +22 -1
- package/src/charts/CountSeries.tsx +27 -1
- package/src/charts/DataSeries.tsx +26 -1
- package/src/charts/Generic.tsx +13 -0
- package/src/charts/MapSeries.tsx +24 -1
- package/src/charts/TimeSeries.tsx +24 -1
- package/src/charts/TimeSlider.tsx +21 -1
- package/src/charts/WordBubble.tsx +25 -1
|
@@ -172,7 +172,28 @@ var ActivityMapChart = /*#__PURE__*/react.memo(function (_ref) {
|
|
|
172
172
|
ActivityMapChart.displayName = "ActivityMapChart";
|
|
173
173
|
|
|
174
174
|
/**
|
|
175
|
-
*
|
|
175
|
+
* ActivityMap component renders a chart that visualizes activity data
|
|
176
|
+
* over time, using either a scatter plot or a heatmap.
|
|
177
|
+
* It allows users to switch between different types of visualizations
|
|
178
|
+
* and customize the color palette used in the chart.
|
|
179
|
+
*
|
|
180
|
+
* @param {ActivityMapProps} props - The properties for the ActivityMap component.
|
|
181
|
+
* @returns {JSX.Element} The rendered ActivityMap component.
|
|
182
|
+
*
|
|
183
|
+
* @example
|
|
184
|
+
* ```jsx
|
|
185
|
+
* <ActivityMap
|
|
186
|
+
* data={activityData}
|
|
187
|
+
* time="day-hour"
|
|
188
|
+
* type="heatmap"
|
|
189
|
+
* heatmapPalette={["#f0f8ff", "#faebd7", "#00ffff", "#7fffd4"]}
|
|
190
|
+
* highLabels={["Sun", "Mon", "Tue", "Wed", "Thu", "Fri", "Sat"]}
|
|
191
|
+
* lowLabels={["12a", "1a", "2a", "3a", "4a", "5a", "6a", "7a", "8a", "9a", "10a", "11a", "12p", "1p", "2p", "3p", "4p", "5p", "6p", "7p", "8p", "9p", "10p", "11p"]}
|
|
192
|
+
* onClick={(highIndex, lowIndex) => console.log(`Clicked on: ${highIndex}, ${lowIndex}`)}
|
|
193
|
+
* />
|
|
194
|
+
* ```
|
|
195
|
+
* @see {@link https://adarshpastakia.github.io/react-fabric/?path=/docs/charts-activitymap--docs} for more details on the properties.
|
|
196
|
+
* @see {@link https://echarts.apache.org/en/option.html#series-scatter} for more details on the ECharts scatter series.
|
|
176
197
|
*/
|
|
177
198
|
var ActivityMap = function ActivityMap(props) {
|
|
178
199
|
return /*#__PURE__*/jsxRuntime.jsx(ChartWrapper.ChartWrapper, {
|
|
@@ -145,7 +145,33 @@ var CountSeriesChart = /*#__PURE__*/react.memo(function (_ref) {
|
|
|
145
145
|
CountSeriesChart.displayName = "CountSeriesChart";
|
|
146
146
|
|
|
147
147
|
/**
|
|
148
|
-
*
|
|
148
|
+
* CountSeries component renders a chart that displays counts of items in various formats.
|
|
149
|
+
* It supports pie, bar, and column charts.
|
|
150
|
+
* It can be used to visualize the distribution of counts across different categories.
|
|
151
|
+
* It allows users to switch between different types of visualizations and customize the color palette used in the chart.
|
|
152
|
+
*
|
|
153
|
+
* @param {CountSeriesProps} props - The properties for the CountSeries component.
|
|
154
|
+
* @returns {JSX.Element} The rendered CountSeries component.
|
|
155
|
+
*
|
|
156
|
+
* @example
|
|
157
|
+
* ```jsx
|
|
158
|
+
* <CountSeries
|
|
159
|
+
* data={[
|
|
160
|
+
* { id: "A", label: "Category A", count: 10 },
|
|
161
|
+
* { id: "B", label: "Category B", count: 20 },
|
|
162
|
+
* { id: "C", label: "Category C", count: 30 },
|
|
163
|
+
* ]}
|
|
164
|
+
* title="Count Distribution"
|
|
165
|
+
* onExport={() => console.log("Exporting chart data")}
|
|
166
|
+
* theme="light"
|
|
167
|
+
* type="pie"
|
|
168
|
+
* onClick={(key) => console.log("Clicked on:", key)}
|
|
169
|
+
* />
|
|
170
|
+
* ```
|
|
171
|
+
*
|
|
172
|
+
* @see {@link https://adarshpastakia.github.io/react-fabric/?path=/docs/charts-countseries--docs} for more details on the properties.
|
|
173
|
+
* @see {@link https://echarts.apache.org/en/option.html#series-pie} for more details on the ECharts pie series options.
|
|
174
|
+
* @see {@link https://echarts.apache.org/en/option.html#series-bar} for more details on the ECharts bar series options.
|
|
149
175
|
*/
|
|
150
176
|
var CountSeries = function CountSeries(props) {
|
|
151
177
|
return /*#__PURE__*/jsxRuntime.jsx(ChartWrapper.ChartWrapper, {
|
|
@@ -174,7 +174,32 @@ var DataSeriesChart = /*#__PURE__*/react.memo(function (_ref) {
|
|
|
174
174
|
DataSeriesChart.displayName = "DataSeriesChart";
|
|
175
175
|
|
|
176
176
|
/**
|
|
177
|
-
*
|
|
177
|
+
* DataSeries component renders a chart for visualizing data series.
|
|
178
|
+
* It supports various chart types such as column, line, bar, radar, and stacked variants.
|
|
179
|
+
* It allows users to click on data points to trigger custom actions.
|
|
180
|
+
*
|
|
181
|
+
* @param {DataSeriesProps} props - The properties for the DataSeries component.
|
|
182
|
+
* @returns {JSX.Element} The rendered DataSeries component.
|
|
183
|
+
*
|
|
184
|
+
* @example
|
|
185
|
+
* ```jsx
|
|
186
|
+
* <DataSeries
|
|
187
|
+
* data={[{ id: "1", label: "Series 1", values: [10, 20, 30] }]}
|
|
188
|
+
* categories={["Category 1", "Category 2", "Category 3"]}
|
|
189
|
+
* categoryAxisName="Categories"
|
|
190
|
+
* valueAxisName="Values"
|
|
191
|
+
* title="Data Series Example"
|
|
192
|
+
* type="column"
|
|
193
|
+
* onClick={(data) => console.log("Clicked data:", data)}
|
|
194
|
+
* onExport={() => console.log("Exporting chart data")}
|
|
195
|
+
* theme="light"
|
|
196
|
+
* />
|
|
197
|
+
* ```
|
|
198
|
+
*
|
|
199
|
+
* @see {@link https://adarshpastakia.github.io/react-fabric/?path=/docs/charts-dataseries--docs} for more details on the properties.
|
|
200
|
+
* @see {@link https://echarts.apache.org/en/option.html#series-bar} for ECharts bar series options.
|
|
201
|
+
* @see {@link https://echarts.apache.org/en/option.html#series-line} for ECharts line series options.
|
|
202
|
+
* @see {@link https://echarts.apache.org/en/option.html#series-radar} for ECharts radar series options.
|
|
178
203
|
*/
|
|
179
204
|
var DataSeries = function DataSeries(props) {
|
|
180
205
|
return /*#__PURE__*/jsxRuntime.jsx(ChartWrapper.ChartWrapper, {
|
|
@@ -81,6 +81,20 @@ var GenericChartBase = /*#__PURE__*/react.memo(function (_ref2) {
|
|
|
81
81
|
});
|
|
82
82
|
});
|
|
83
83
|
GenericChartBase.displayName = "GenericChart";
|
|
84
|
+
|
|
85
|
+
/**
|
|
86
|
+
* GenericChart component renders a generic chart using ECharts.
|
|
87
|
+
* It accepts various chart options and configurations, allowing for flexible chart rendering.
|
|
88
|
+
* It supports click events, brush events, and custom actions.
|
|
89
|
+
* It can be used to create a wide range of chart types by passing the appropriate ECharts options.
|
|
90
|
+
*
|
|
91
|
+
* @param props - The properties for the GenericChart component, including chart options, event handlers, and custom actions.
|
|
92
|
+
* @returns A React functional component that renders the chart within a ChartWrapper.
|
|
93
|
+
*
|
|
94
|
+
* @see {@link https://adarshpastakia.github.io/react-fabric/?path=/docs/charts-genericchart--docs} for more details on the properties.
|
|
95
|
+
* @see {@link https://echarts.apache.org/en/option.html} for ECharts options documentation.
|
|
96
|
+
* @see {@link https://echarts.apache.org/en/api.html#echartsInstance} for ECharts instance methods and properties.
|
|
97
|
+
*/
|
|
84
98
|
var GenericChart = function GenericChart(props) {
|
|
85
99
|
return /*#__PURE__*/jsxRuntime.jsx(ChartWrapper.ChartWrapper, {
|
|
86
100
|
children: /*#__PURE__*/jsxRuntime.jsx(GenericChartBase, _objectSpread({}, props))
|
|
@@ -204,7 +204,30 @@ var MapSeriesChart = /*#__PURE__*/react.memo(function (_ref) {
|
|
|
204
204
|
MapSeriesChart.displayName = "MapSeriesChart";
|
|
205
205
|
|
|
206
206
|
/**
|
|
207
|
-
*
|
|
207
|
+
* MapSeries component renders a map chart using ECharts.
|
|
208
|
+
* It displays data on a world map, allowing users to visualize counts or other metrics by country.
|
|
209
|
+
* It supports zooming and switching between map and column views.
|
|
210
|
+
*
|
|
211
|
+
* @param {MapSeriesProps} props - The properties for the MapSeries component.
|
|
212
|
+
* @returns {JSX.Element} The rendered MapSeries component.
|
|
213
|
+
*
|
|
214
|
+
* @example
|
|
215
|
+
* ```jsx
|
|
216
|
+
* <MapSeries
|
|
217
|
+
* data={[
|
|
218
|
+
* { id: "US", label: "United States", count: 100 },
|
|
219
|
+
* { id: "IN", label: "India", count: 200 },
|
|
220
|
+
* { id: "CN", label: "China", count: 300 },
|
|
221
|
+
* ]}
|
|
222
|
+
* onExport={() => console.log("Exporting chart")}
|
|
223
|
+
* title="World Map Series"
|
|
224
|
+
* onClick={(key) => console.log("Clicked country:", key)}
|
|
225
|
+
* theme="light"
|
|
226
|
+
* />
|
|
227
|
+
* ```
|
|
228
|
+
*
|
|
229
|
+
* @see {@link https://adarshpastakia.github.io/react-fabric/?path=/docs/charts-mapseries--docs} for more details on the properties.
|
|
230
|
+
* @see {@link https://echarts.apache.org/en/option.html#series-map} for ECharts map series options documentation.
|
|
208
231
|
*/
|
|
209
232
|
var MapSeries = function MapSeries(props) {
|
|
210
233
|
return /*#__PURE__*/jsxRuntime.jsx(ChartWrapper.ChartWrapper, {
|
|
@@ -202,7 +202,30 @@ var TimeSeriesChart = /*#__PURE__*/react.memo(function (_ref) {
|
|
|
202
202
|
TimeSeriesChart.displayName = "TimeSeriesChart";
|
|
203
203
|
|
|
204
204
|
/**
|
|
205
|
-
*
|
|
205
|
+
* TimeSeries component renders a time series chart using the provided data and options.
|
|
206
|
+
* It supports different chart types such as line, column, and stacked variants.
|
|
207
|
+
* It also allows for interaction through click and brush events.
|
|
208
|
+
*
|
|
209
|
+
* @param {TimeSeriesProps} props - The properties for the TimeSeries component.
|
|
210
|
+
* @returns {JSX.Element} The rendered TimeSeries component.
|
|
211
|
+
*
|
|
212
|
+
* @example
|
|
213
|
+
* ```jsx
|
|
214
|
+
* <TimeSeries
|
|
215
|
+
* data={data}
|
|
216
|
+
* onExport={handleExport}
|
|
217
|
+
* categoryAxisName="Time"
|
|
218
|
+
* valueAxisName="Value"
|
|
219
|
+
* title="Time Series Chart"
|
|
220
|
+
* type="line"
|
|
221
|
+
* onClick={(data) => console.log(data)}
|
|
222
|
+
* onBrush={(range) => console.log(range)}
|
|
223
|
+
* />
|
|
224
|
+
* ```
|
|
225
|
+
*
|
|
226
|
+
* @see {@link https://adarshpastakia.github.io/react-fabric/?path=/docs/charts-timeseries--docs} for more details on the properties.
|
|
227
|
+
* @see {@link https://echarts.apache.org/en/option.html#series-line} for more details on the ECharts line series options.
|
|
228
|
+
* @see {@link https://echarts.apache.org/en/option.html#series-bar} for more details on the ECharts bar series options.
|
|
206
229
|
*/
|
|
207
230
|
var TimeSeries = function TimeSeries(props) {
|
|
208
231
|
return /*#__PURE__*/jsxRuntime.jsx(ChartWrapper.ChartWrapper, {
|
|
@@ -184,7 +184,27 @@ var TimeSliderChart = /*#__PURE__*/react.memo(function (_ref) {
|
|
|
184
184
|
TimeSliderChart.displayName = "TimeSliderChart";
|
|
185
185
|
|
|
186
186
|
/**
|
|
187
|
-
*
|
|
187
|
+
* TimeSlider component renders a time slider chart.
|
|
188
|
+
* It allows users to visualize time-based data and interactively select a range.
|
|
189
|
+
* The chart supports brushing to select a specific time range,
|
|
190
|
+
* and it emits an event when the range is changed.
|
|
191
|
+
*
|
|
192
|
+
* @param {TimeSliderProps} props - The properties for the TimeSlider component.
|
|
193
|
+
* @returns {JSX.Element} The rendered TimeSlider component.
|
|
194
|
+
*
|
|
195
|
+
* @example
|
|
196
|
+
* ```jsx
|
|
197
|
+
* <TimeSlider
|
|
198
|
+
* data={data}
|
|
199
|
+
* range={{ start: new Date("2023-01-01"), end: new Date("2023-12-31") }}
|
|
200
|
+
* onBrush={(range) => console.log("Selected range:", range)}
|
|
201
|
+
* />
|
|
202
|
+
* ```
|
|
203
|
+
*
|
|
204
|
+
* @see {@link https://adarshpastakia.github.io/react-fabric/?path=/docs/charts-timeslider--docs} for more details on the properties.
|
|
205
|
+
* @see {@link https://echarts.apache.org/en/option.html#dataZoom} for more details on the ECharts dataZoom feature.
|
|
206
|
+
* @see {@link https://echarts.apache.org/en/option.html#series-line} for more details on the ECharts line series.
|
|
207
|
+
*/
|
|
188
208
|
var TimeSlider = function TimeSlider(props) {
|
|
189
209
|
return /*#__PURE__*/jsxRuntime.jsx(ChartWrapper.ChartWrapper, {
|
|
190
210
|
children: /*#__PURE__*/jsxRuntime.jsx(TimeSliderChart, _objectSpread({}, props))
|
|
@@ -69,7 +69,31 @@ var WordBubbleChart = /*#__PURE__*/react.memo(function (_ref) {
|
|
|
69
69
|
WordBubbleChart.displayName = "WordBubbleChart";
|
|
70
70
|
|
|
71
71
|
/**
|
|
72
|
-
*
|
|
72
|
+
* WordBubble component renders a word cloud chart using ECharts.
|
|
73
|
+
* It displays words with sizes proportional to their frequency in the data.
|
|
74
|
+
* Users can click on words to trigger an action, such as filtering or navigating.
|
|
75
|
+
* It also supports exporting the chart and displays an empty state when no data is available.
|
|
76
|
+
*
|
|
77
|
+
* @param {WordBubbleProps} props - The properties for the WordBubble component.
|
|
78
|
+
* @returns {JSX.Element} The rendered WordBubble component.
|
|
79
|
+
*
|
|
80
|
+
* @example
|
|
81
|
+
* ```jsx
|
|
82
|
+
* <WordBubble
|
|
83
|
+
* data={[
|
|
84
|
+
* { id: "1", label: "Word One", count: 10 },
|
|
85
|
+
* { id: "2", label: "Word Two", count: 20 },
|
|
86
|
+
* { id: "3", label: "Word Three", count: 30 },
|
|
87
|
+
* ]}
|
|
88
|
+
* title="Word Frequency"
|
|
89
|
+
* onExport={() => console.log("Exporting chart...")}
|
|
90
|
+
* onClick={(key) => console.log("Clicked word:", key)}
|
|
91
|
+
* theme="light"
|
|
92
|
+
* />
|
|
93
|
+
* ```
|
|
94
|
+
*
|
|
95
|
+
* @see {@link https://adarshpastakia.github.io/react-fabric/?path=/docs/charts-wordbubble--docs} for the properties that can be passed to this component.
|
|
96
|
+
* @see {@link https://github.com/ecomfe/echarts-wordcloud} for the underlying chart implementation.
|
|
73
97
|
*/
|
|
74
98
|
var WordBubble = function WordBubble(props) {
|
|
75
99
|
return /*#__PURE__*/jsxRuntime.jsx(ChartWrapper.ChartWrapper, {
|
|
@@ -172,7 +172,28 @@ var ActivityMapChart = /*#__PURE__*/memo(function (_ref) {
|
|
|
172
172
|
ActivityMapChart.displayName = "ActivityMapChart";
|
|
173
173
|
|
|
174
174
|
/**
|
|
175
|
-
*
|
|
175
|
+
* ActivityMap component renders a chart that visualizes activity data
|
|
176
|
+
* over time, using either a scatter plot or a heatmap.
|
|
177
|
+
* It allows users to switch between different types of visualizations
|
|
178
|
+
* and customize the color palette used in the chart.
|
|
179
|
+
*
|
|
180
|
+
* @param {ActivityMapProps} props - The properties for the ActivityMap component.
|
|
181
|
+
* @returns {JSX.Element} The rendered ActivityMap component.
|
|
182
|
+
*
|
|
183
|
+
* @example
|
|
184
|
+
* ```jsx
|
|
185
|
+
* <ActivityMap
|
|
186
|
+
* data={activityData}
|
|
187
|
+
* time="day-hour"
|
|
188
|
+
* type="heatmap"
|
|
189
|
+
* heatmapPalette={["#f0f8ff", "#faebd7", "#00ffff", "#7fffd4"]}
|
|
190
|
+
* highLabels={["Sun", "Mon", "Tue", "Wed", "Thu", "Fri", "Sat"]}
|
|
191
|
+
* lowLabels={["12a", "1a", "2a", "3a", "4a", "5a", "6a", "7a", "8a", "9a", "10a", "11a", "12p", "1p", "2p", "3p", "4p", "5p", "6p", "7p", "8p", "9p", "10p", "11p"]}
|
|
192
|
+
* onClick={(highIndex, lowIndex) => console.log(`Clicked on: ${highIndex}, ${lowIndex}`)}
|
|
193
|
+
* />
|
|
194
|
+
* ```
|
|
195
|
+
* @see {@link https://adarshpastakia.github.io/react-fabric/?path=/docs/charts-activitymap--docs} for more details on the properties.
|
|
196
|
+
* @see {@link https://echarts.apache.org/en/option.html#series-scatter} for more details on the ECharts scatter series.
|
|
176
197
|
*/
|
|
177
198
|
var ActivityMap = function ActivityMap(props) {
|
|
178
199
|
return /*#__PURE__*/jsx(ChartWrapper, {
|
|
@@ -145,7 +145,33 @@ var CountSeriesChart = /*#__PURE__*/memo(function (_ref) {
|
|
|
145
145
|
CountSeriesChart.displayName = "CountSeriesChart";
|
|
146
146
|
|
|
147
147
|
/**
|
|
148
|
-
*
|
|
148
|
+
* CountSeries component renders a chart that displays counts of items in various formats.
|
|
149
|
+
* It supports pie, bar, and column charts.
|
|
150
|
+
* It can be used to visualize the distribution of counts across different categories.
|
|
151
|
+
* It allows users to switch between different types of visualizations and customize the color palette used in the chart.
|
|
152
|
+
*
|
|
153
|
+
* @param {CountSeriesProps} props - The properties for the CountSeries component.
|
|
154
|
+
* @returns {JSX.Element} The rendered CountSeries component.
|
|
155
|
+
*
|
|
156
|
+
* @example
|
|
157
|
+
* ```jsx
|
|
158
|
+
* <CountSeries
|
|
159
|
+
* data={[
|
|
160
|
+
* { id: "A", label: "Category A", count: 10 },
|
|
161
|
+
* { id: "B", label: "Category B", count: 20 },
|
|
162
|
+
* { id: "C", label: "Category C", count: 30 },
|
|
163
|
+
* ]}
|
|
164
|
+
* title="Count Distribution"
|
|
165
|
+
* onExport={() => console.log("Exporting chart data")}
|
|
166
|
+
* theme="light"
|
|
167
|
+
* type="pie"
|
|
168
|
+
* onClick={(key) => console.log("Clicked on:", key)}
|
|
169
|
+
* />
|
|
170
|
+
* ```
|
|
171
|
+
*
|
|
172
|
+
* @see {@link https://adarshpastakia.github.io/react-fabric/?path=/docs/charts-countseries--docs} for more details on the properties.
|
|
173
|
+
* @see {@link https://echarts.apache.org/en/option.html#series-pie} for more details on the ECharts pie series options.
|
|
174
|
+
* @see {@link https://echarts.apache.org/en/option.html#series-bar} for more details on the ECharts bar series options.
|
|
149
175
|
*/
|
|
150
176
|
var CountSeries = function CountSeries(props) {
|
|
151
177
|
return /*#__PURE__*/jsx(ChartWrapper, {
|
|
@@ -174,7 +174,32 @@ var DataSeriesChart = /*#__PURE__*/memo(function (_ref) {
|
|
|
174
174
|
DataSeriesChart.displayName = "DataSeriesChart";
|
|
175
175
|
|
|
176
176
|
/**
|
|
177
|
-
*
|
|
177
|
+
* DataSeries component renders a chart for visualizing data series.
|
|
178
|
+
* It supports various chart types such as column, line, bar, radar, and stacked variants.
|
|
179
|
+
* It allows users to click on data points to trigger custom actions.
|
|
180
|
+
*
|
|
181
|
+
* @param {DataSeriesProps} props - The properties for the DataSeries component.
|
|
182
|
+
* @returns {JSX.Element} The rendered DataSeries component.
|
|
183
|
+
*
|
|
184
|
+
* @example
|
|
185
|
+
* ```jsx
|
|
186
|
+
* <DataSeries
|
|
187
|
+
* data={[{ id: "1", label: "Series 1", values: [10, 20, 30] }]}
|
|
188
|
+
* categories={["Category 1", "Category 2", "Category 3"]}
|
|
189
|
+
* categoryAxisName="Categories"
|
|
190
|
+
* valueAxisName="Values"
|
|
191
|
+
* title="Data Series Example"
|
|
192
|
+
* type="column"
|
|
193
|
+
* onClick={(data) => console.log("Clicked data:", data)}
|
|
194
|
+
* onExport={() => console.log("Exporting chart data")}
|
|
195
|
+
* theme="light"
|
|
196
|
+
* />
|
|
197
|
+
* ```
|
|
198
|
+
*
|
|
199
|
+
* @see {@link https://adarshpastakia.github.io/react-fabric/?path=/docs/charts-dataseries--docs} for more details on the properties.
|
|
200
|
+
* @see {@link https://echarts.apache.org/en/option.html#series-bar} for ECharts bar series options.
|
|
201
|
+
* @see {@link https://echarts.apache.org/en/option.html#series-line} for ECharts line series options.
|
|
202
|
+
* @see {@link https://echarts.apache.org/en/option.html#series-radar} for ECharts radar series options.
|
|
178
203
|
*/
|
|
179
204
|
var DataSeries = function DataSeries(props) {
|
|
180
205
|
return /*#__PURE__*/jsx(ChartWrapper, {
|
|
@@ -81,6 +81,20 @@ var GenericChartBase = /*#__PURE__*/memo(function (_ref2) {
|
|
|
81
81
|
});
|
|
82
82
|
});
|
|
83
83
|
GenericChartBase.displayName = "GenericChart";
|
|
84
|
+
|
|
85
|
+
/**
|
|
86
|
+
* GenericChart component renders a generic chart using ECharts.
|
|
87
|
+
* It accepts various chart options and configurations, allowing for flexible chart rendering.
|
|
88
|
+
* It supports click events, brush events, and custom actions.
|
|
89
|
+
* It can be used to create a wide range of chart types by passing the appropriate ECharts options.
|
|
90
|
+
*
|
|
91
|
+
* @param props - The properties for the GenericChart component, including chart options, event handlers, and custom actions.
|
|
92
|
+
* @returns A React functional component that renders the chart within a ChartWrapper.
|
|
93
|
+
*
|
|
94
|
+
* @see {@link https://adarshpastakia.github.io/react-fabric/?path=/docs/charts-genericchart--docs} for more details on the properties.
|
|
95
|
+
* @see {@link https://echarts.apache.org/en/option.html} for ECharts options documentation.
|
|
96
|
+
* @see {@link https://echarts.apache.org/en/api.html#echartsInstance} for ECharts instance methods and properties.
|
|
97
|
+
*/
|
|
84
98
|
var GenericChart = function GenericChart(props) {
|
|
85
99
|
return /*#__PURE__*/jsx(ChartWrapper, {
|
|
86
100
|
children: /*#__PURE__*/jsx(GenericChartBase, _objectSpread({}, props))
|
|
@@ -185,7 +185,30 @@ var MapSeriesChart = /*#__PURE__*/memo(function (_ref) {
|
|
|
185
185
|
MapSeriesChart.displayName = "MapSeriesChart";
|
|
186
186
|
|
|
187
187
|
/**
|
|
188
|
-
*
|
|
188
|
+
* MapSeries component renders a map chart using ECharts.
|
|
189
|
+
* It displays data on a world map, allowing users to visualize counts or other metrics by country.
|
|
190
|
+
* It supports zooming and switching between map and column views.
|
|
191
|
+
*
|
|
192
|
+
* @param {MapSeriesProps} props - The properties for the MapSeries component.
|
|
193
|
+
* @returns {JSX.Element} The rendered MapSeries component.
|
|
194
|
+
*
|
|
195
|
+
* @example
|
|
196
|
+
* ```jsx
|
|
197
|
+
* <MapSeries
|
|
198
|
+
* data={[
|
|
199
|
+
* { id: "US", label: "United States", count: 100 },
|
|
200
|
+
* { id: "IN", label: "India", count: 200 },
|
|
201
|
+
* { id: "CN", label: "China", count: 300 },
|
|
202
|
+
* ]}
|
|
203
|
+
* onExport={() => console.log("Exporting chart")}
|
|
204
|
+
* title="World Map Series"
|
|
205
|
+
* onClick={(key) => console.log("Clicked country:", key)}
|
|
206
|
+
* theme="light"
|
|
207
|
+
* />
|
|
208
|
+
* ```
|
|
209
|
+
*
|
|
210
|
+
* @see {@link https://adarshpastakia.github.io/react-fabric/?path=/docs/charts-mapseries--docs} for more details on the properties.
|
|
211
|
+
* @see {@link https://echarts.apache.org/en/option.html#series-map} for ECharts map series options documentation.
|
|
189
212
|
*/
|
|
190
213
|
var MapSeries = function MapSeries(props) {
|
|
191
214
|
return /*#__PURE__*/jsx(ChartWrapper, {
|
|
@@ -202,7 +202,30 @@ var TimeSeriesChart = /*#__PURE__*/memo(function (_ref) {
|
|
|
202
202
|
TimeSeriesChart.displayName = "TimeSeriesChart";
|
|
203
203
|
|
|
204
204
|
/**
|
|
205
|
-
*
|
|
205
|
+
* TimeSeries component renders a time series chart using the provided data and options.
|
|
206
|
+
* It supports different chart types such as line, column, and stacked variants.
|
|
207
|
+
* It also allows for interaction through click and brush events.
|
|
208
|
+
*
|
|
209
|
+
* @param {TimeSeriesProps} props - The properties for the TimeSeries component.
|
|
210
|
+
* @returns {JSX.Element} The rendered TimeSeries component.
|
|
211
|
+
*
|
|
212
|
+
* @example
|
|
213
|
+
* ```jsx
|
|
214
|
+
* <TimeSeries
|
|
215
|
+
* data={data}
|
|
216
|
+
* onExport={handleExport}
|
|
217
|
+
* categoryAxisName="Time"
|
|
218
|
+
* valueAxisName="Value"
|
|
219
|
+
* title="Time Series Chart"
|
|
220
|
+
* type="line"
|
|
221
|
+
* onClick={(data) => console.log(data)}
|
|
222
|
+
* onBrush={(range) => console.log(range)}
|
|
223
|
+
* />
|
|
224
|
+
* ```
|
|
225
|
+
*
|
|
226
|
+
* @see {@link https://adarshpastakia.github.io/react-fabric/?path=/docs/charts-timeseries--docs} for more details on the properties.
|
|
227
|
+
* @see {@link https://echarts.apache.org/en/option.html#series-line} for more details on the ECharts line series options.
|
|
228
|
+
* @see {@link https://echarts.apache.org/en/option.html#series-bar} for more details on the ECharts bar series options.
|
|
206
229
|
*/
|
|
207
230
|
var TimeSeries = function TimeSeries(props) {
|
|
208
231
|
return /*#__PURE__*/jsx(ChartWrapper, {
|
|
@@ -184,7 +184,27 @@ var TimeSliderChart = /*#__PURE__*/memo(function (_ref) {
|
|
|
184
184
|
TimeSliderChart.displayName = "TimeSliderChart";
|
|
185
185
|
|
|
186
186
|
/**
|
|
187
|
-
*
|
|
187
|
+
* TimeSlider component renders a time slider chart.
|
|
188
|
+
* It allows users to visualize time-based data and interactively select a range.
|
|
189
|
+
* The chart supports brushing to select a specific time range,
|
|
190
|
+
* and it emits an event when the range is changed.
|
|
191
|
+
*
|
|
192
|
+
* @param {TimeSliderProps} props - The properties for the TimeSlider component.
|
|
193
|
+
* @returns {JSX.Element} The rendered TimeSlider component.
|
|
194
|
+
*
|
|
195
|
+
* @example
|
|
196
|
+
* ```jsx
|
|
197
|
+
* <TimeSlider
|
|
198
|
+
* data={data}
|
|
199
|
+
* range={{ start: new Date("2023-01-01"), end: new Date("2023-12-31") }}
|
|
200
|
+
* onBrush={(range) => console.log("Selected range:", range)}
|
|
201
|
+
* />
|
|
202
|
+
* ```
|
|
203
|
+
*
|
|
204
|
+
* @see {@link https://adarshpastakia.github.io/react-fabric/?path=/docs/charts-timeslider--docs} for more details on the properties.
|
|
205
|
+
* @see {@link https://echarts.apache.org/en/option.html#dataZoom} for more details on the ECharts dataZoom feature.
|
|
206
|
+
* @see {@link https://echarts.apache.org/en/option.html#series-line} for more details on the ECharts line series.
|
|
207
|
+
*/
|
|
188
208
|
var TimeSlider = function TimeSlider(props) {
|
|
189
209
|
return /*#__PURE__*/jsx(ChartWrapper, {
|
|
190
210
|
children: /*#__PURE__*/jsx(TimeSliderChart, _objectSpread({}, props))
|
|
@@ -69,7 +69,31 @@ var WordBubbleChart = /*#__PURE__*/memo(function (_ref) {
|
|
|
69
69
|
WordBubbleChart.displayName = "WordBubbleChart";
|
|
70
70
|
|
|
71
71
|
/**
|
|
72
|
-
*
|
|
72
|
+
* WordBubble component renders a word cloud chart using ECharts.
|
|
73
|
+
* It displays words with sizes proportional to their frequency in the data.
|
|
74
|
+
* Users can click on words to trigger an action, such as filtering or navigating.
|
|
75
|
+
* It also supports exporting the chart and displays an empty state when no data is available.
|
|
76
|
+
*
|
|
77
|
+
* @param {WordBubbleProps} props - The properties for the WordBubble component.
|
|
78
|
+
* @returns {JSX.Element} The rendered WordBubble component.
|
|
79
|
+
*
|
|
80
|
+
* @example
|
|
81
|
+
* ```jsx
|
|
82
|
+
* <WordBubble
|
|
83
|
+
* data={[
|
|
84
|
+
* { id: "1", label: "Word One", count: 10 },
|
|
85
|
+
* { id: "2", label: "Word Two", count: 20 },
|
|
86
|
+
* { id: "3", label: "Word Three", count: 30 },
|
|
87
|
+
* ]}
|
|
88
|
+
* title="Word Frequency"
|
|
89
|
+
* onExport={() => console.log("Exporting chart...")}
|
|
90
|
+
* onClick={(key) => console.log("Clicked word:", key)}
|
|
91
|
+
* theme="light"
|
|
92
|
+
* />
|
|
93
|
+
* ```
|
|
94
|
+
*
|
|
95
|
+
* @see {@link https://adarshpastakia.github.io/react-fabric/?path=/docs/charts-wordbubble--docs} for the properties that can be passed to this component.
|
|
96
|
+
* @see {@link https://github.com/ecomfe/echarts-wordcloud} for the underlying chart implementation.
|
|
73
97
|
*/
|
|
74
98
|
var WordBubble = function WordBubble(props) {
|
|
75
99
|
return /*#__PURE__*/jsx(ChartWrapper, {
|
|
@@ -16,6 +16,27 @@ export interface ActivityMapProps extends BaseChart {
|
|
|
16
16
|
onClick?: (highIndex: number, lowIndex: number) => void;
|
|
17
17
|
}
|
|
18
18
|
/**
|
|
19
|
-
*
|
|
19
|
+
* ActivityMap component renders a chart that visualizes activity data
|
|
20
|
+
* over time, using either a scatter plot or a heatmap.
|
|
21
|
+
* It allows users to switch between different types of visualizations
|
|
22
|
+
* and customize the color palette used in the chart.
|
|
23
|
+
*
|
|
24
|
+
* @param {ActivityMapProps} props - The properties for the ActivityMap component.
|
|
25
|
+
* @returns {JSX.Element} The rendered ActivityMap component.
|
|
26
|
+
*
|
|
27
|
+
* @example
|
|
28
|
+
* ```jsx
|
|
29
|
+
* <ActivityMap
|
|
30
|
+
* data={activityData}
|
|
31
|
+
* time="day-hour"
|
|
32
|
+
* type="heatmap"
|
|
33
|
+
* heatmapPalette={["#f0f8ff", "#faebd7", "#00ffff", "#7fffd4"]}
|
|
34
|
+
* highLabels={["Sun", "Mon", "Tue", "Wed", "Thu", "Fri", "Sat"]}
|
|
35
|
+
* lowLabels={["12a", "1a", "2a", "3a", "4a", "5a", "6a", "7a", "8a", "9a", "10a", "11a", "12p", "1p", "2p", "3p", "4p", "5p", "6p", "7p", "8p", "9p", "10p", "11p"]}
|
|
36
|
+
* onClick={(highIndex, lowIndex) => console.log(`Clicked on: ${highIndex}, ${lowIndex}`)}
|
|
37
|
+
* />
|
|
38
|
+
* ```
|
|
39
|
+
* @see {@link https://adarshpastakia.github.io/react-fabric/?path=/docs/charts-activitymap--docs} for more details on the properties.
|
|
40
|
+
* @see {@link https://echarts.apache.org/en/option.html#series-scatter} for more details on the ECharts scatter series.
|
|
20
41
|
*/
|
|
21
42
|
export declare const ActivityMap: FC<ActivityMapProps>;
|
|
@@ -5,6 +5,32 @@ export interface CountSeriesProps extends BaseChart, CountType {
|
|
|
5
5
|
onClick?: (key: string) => void;
|
|
6
6
|
}
|
|
7
7
|
/**
|
|
8
|
-
*
|
|
8
|
+
* CountSeries component renders a chart that displays counts of items in various formats.
|
|
9
|
+
* It supports pie, bar, and column charts.
|
|
10
|
+
* It can be used to visualize the distribution of counts across different categories.
|
|
11
|
+
* It allows users to switch between different types of visualizations and customize the color palette used in the chart.
|
|
12
|
+
*
|
|
13
|
+
* @param {CountSeriesProps} props - The properties for the CountSeries component.
|
|
14
|
+
* @returns {JSX.Element} The rendered CountSeries component.
|
|
15
|
+
*
|
|
16
|
+
* @example
|
|
17
|
+
* ```jsx
|
|
18
|
+
* <CountSeries
|
|
19
|
+
* data={[
|
|
20
|
+
* { id: "A", label: "Category A", count: 10 },
|
|
21
|
+
* { id: "B", label: "Category B", count: 20 },
|
|
22
|
+
* { id: "C", label: "Category C", count: 30 },
|
|
23
|
+
* ]}
|
|
24
|
+
* title="Count Distribution"
|
|
25
|
+
* onExport={() => console.log("Exporting chart data")}
|
|
26
|
+
* theme="light"
|
|
27
|
+
* type="pie"
|
|
28
|
+
* onClick={(key) => console.log("Clicked on:", key)}
|
|
29
|
+
* />
|
|
30
|
+
* ```
|
|
31
|
+
*
|
|
32
|
+
* @see {@link https://adarshpastakia.github.io/react-fabric/?path=/docs/charts-countseries--docs} for more details on the properties.
|
|
33
|
+
* @see {@link https://echarts.apache.org/en/option.html#series-pie} for more details on the ECharts pie series options.
|
|
34
|
+
* @see {@link https://echarts.apache.org/en/option.html#series-bar} for more details on the ECharts bar series options.
|
|
9
35
|
*/
|
|
10
36
|
export declare const CountSeries: FC<CountSeriesProps>;
|
|
@@ -8,6 +8,31 @@ export interface DataSeriesProps extends BaseChart, SeriesType {
|
|
|
8
8
|
}) => void;
|
|
9
9
|
}
|
|
10
10
|
/**
|
|
11
|
-
*
|
|
11
|
+
* DataSeries component renders a chart for visualizing data series.
|
|
12
|
+
* It supports various chart types such as column, line, bar, radar, and stacked variants.
|
|
13
|
+
* It allows users to click on data points to trigger custom actions.
|
|
14
|
+
*
|
|
15
|
+
* @param {DataSeriesProps} props - The properties for the DataSeries component.
|
|
16
|
+
* @returns {JSX.Element} The rendered DataSeries component.
|
|
17
|
+
*
|
|
18
|
+
* @example
|
|
19
|
+
* ```jsx
|
|
20
|
+
* <DataSeries
|
|
21
|
+
* data={[{ id: "1", label: "Series 1", values: [10, 20, 30] }]}
|
|
22
|
+
* categories={["Category 1", "Category 2", "Category 3"]}
|
|
23
|
+
* categoryAxisName="Categories"
|
|
24
|
+
* valueAxisName="Values"
|
|
25
|
+
* title="Data Series Example"
|
|
26
|
+
* type="column"
|
|
27
|
+
* onClick={(data) => console.log("Clicked data:", data)}
|
|
28
|
+
* onExport={() => console.log("Exporting chart data")}
|
|
29
|
+
* theme="light"
|
|
30
|
+
* />
|
|
31
|
+
* ```
|
|
32
|
+
*
|
|
33
|
+
* @see {@link https://adarshpastakia.github.io/react-fabric/?path=/docs/charts-dataseries--docs} for more details on the properties.
|
|
34
|
+
* @see {@link https://echarts.apache.org/en/option.html#series-bar} for ECharts bar series options.
|
|
35
|
+
* @see {@link https://echarts.apache.org/en/option.html#series-line} for ECharts line series options.
|
|
36
|
+
* @see {@link https://echarts.apache.org/en/option.html#series-radar} for ECharts radar series options.
|
|
12
37
|
*/
|
|
13
38
|
export declare const DataSeries: FC<DataSeriesProps>;
|
|
@@ -53,4 +53,17 @@ export interface GenericProps extends BaseChart {
|
|
|
53
53
|
*/
|
|
54
54
|
dataTableRenderer?: (chartOption: EChartOption) => string;
|
|
55
55
|
}
|
|
56
|
+
/**
|
|
57
|
+
* GenericChart component renders a generic chart using ECharts.
|
|
58
|
+
* It accepts various chart options and configurations, allowing for flexible chart rendering.
|
|
59
|
+
* It supports click events, brush events, and custom actions.
|
|
60
|
+
* It can be used to create a wide range of chart types by passing the appropriate ECharts options.
|
|
61
|
+
*
|
|
62
|
+
* @param props - The properties for the GenericChart component, including chart options, event handlers, and custom actions.
|
|
63
|
+
* @returns A React functional component that renders the chart within a ChartWrapper.
|
|
64
|
+
*
|
|
65
|
+
* @see {@link https://adarshpastakia.github.io/react-fabric/?path=/docs/charts-genericchart--docs} for more details on the properties.
|
|
66
|
+
* @see {@link https://echarts.apache.org/en/option.html} for ECharts options documentation.
|
|
67
|
+
* @see {@link https://echarts.apache.org/en/api.html#echartsInstance} for ECharts instance methods and properties.
|
|
68
|
+
*/
|
|
56
69
|
export declare const GenericChart: FC<GenericProps>;
|