@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.
Files changed (34) hide show
  1. package/dist/cjs/charts/ActivityMap.js +22 -1
  2. package/dist/cjs/charts/CountSeries.js +27 -1
  3. package/dist/cjs/charts/DataSeries.js +26 -1
  4. package/dist/cjs/charts/Generic.js +14 -0
  5. package/dist/cjs/charts/MapSeries.js +24 -1
  6. package/dist/cjs/charts/TimeSeries.js +24 -1
  7. package/dist/cjs/charts/TimeSlider.js +21 -1
  8. package/dist/cjs/charts/WordBubble.js +25 -1
  9. package/dist/esm/charts/ActivityMap.js +22 -1
  10. package/dist/esm/charts/CountSeries.js +27 -1
  11. package/dist/esm/charts/DataSeries.js +26 -1
  12. package/dist/esm/charts/Generic.js +14 -0
  13. package/dist/esm/charts/MapSeries.js +24 -1
  14. package/dist/esm/charts/TimeSeries.js +24 -1
  15. package/dist/esm/charts/TimeSlider.js +21 -1
  16. package/dist/esm/charts/WordBubble.js +25 -1
  17. package/dist/types/charts/ActivityMap.d.ts +22 -1
  18. package/dist/types/charts/CountSeries.d.ts +27 -1
  19. package/dist/types/charts/DataSeries.d.ts +26 -1
  20. package/dist/types/charts/Generic.d.ts +13 -0
  21. package/dist/types/charts/MapSeries.d.ts +24 -1
  22. package/dist/types/charts/TimeSeries.d.ts +24 -1
  23. package/dist/types/charts/TimeSlider.d.ts +21 -1
  24. package/dist/types/charts/WordBubble.d.ts +25 -1
  25. package/dist/types/types/world.svg.d.ts +1 -1
  26. package/package.json +4 -4
  27. package/src/charts/ActivityMap.tsx +22 -1
  28. package/src/charts/CountSeries.tsx +27 -1
  29. package/src/charts/DataSeries.tsx +26 -1
  30. package/src/charts/Generic.tsx +13 -0
  31. package/src/charts/MapSeries.tsx +24 -1
  32. package/src/charts/TimeSeries.tsx +24 -1
  33. package/src/charts/TimeSlider.tsx +21 -1
  34. package/src/charts/WordBubble.tsx +25 -1
@@ -4,6 +4,29 @@ export interface MapSeriesProps extends BaseChart, CountType {
4
4
  onClick?: (key: string) => void;
5
5
  }
6
6
  /**
7
- * Chart to display simple map data series
7
+ * MapSeries component renders a map chart using ECharts.
8
+ * It displays data on a world map, allowing users to visualize counts or other metrics by country.
9
+ * It supports zooming and switching between map and column views.
10
+ *
11
+ * @param {MapSeriesProps} props - The properties for the MapSeries component.
12
+ * @returns {JSX.Element} The rendered MapSeries component.
13
+ *
14
+ * @example
15
+ * ```jsx
16
+ * <MapSeries
17
+ * data={[
18
+ * { id: "US", label: "United States", count: 100 },
19
+ * { id: "IN", label: "India", count: 200 },
20
+ * { id: "CN", label: "China", count: 300 },
21
+ * ]}
22
+ * onExport={() => console.log("Exporting chart")}
23
+ * title="World Map Series"
24
+ * onClick={(key) => console.log("Clicked country:", key)}
25
+ * theme="light"
26
+ * />
27
+ * ```
28
+ *
29
+ * @see {@link https://adarshpastakia.github.io/react-fabric/?path=/docs/charts-mapseries--docs} for more details on the properties.
30
+ * @see {@link https://echarts.apache.org/en/option.html#series-map} for ECharts map series options documentation.
8
31
  */
9
32
  export declare const MapSeries: FC<MapSeriesProps>;
@@ -12,6 +12,29 @@ export interface TimeSeriesProps extends BaseChart, TimeSeriesType {
12
12
  }) => void;
13
13
  }
14
14
  /**
15
- * Chart to display simple data time series
15
+ * TimeSeries component renders a time series chart using the provided data and options.
16
+ * It supports different chart types such as line, column, and stacked variants.
17
+ * It also allows for interaction through click and brush events.
18
+ *
19
+ * @param {TimeSeriesProps} props - The properties for the TimeSeries component.
20
+ * @returns {JSX.Element} The rendered TimeSeries component.
21
+ *
22
+ * @example
23
+ * ```jsx
24
+ * <TimeSeries
25
+ * data={data}
26
+ * onExport={handleExport}
27
+ * categoryAxisName="Time"
28
+ * valueAxisName="Value"
29
+ * title="Time Series Chart"
30
+ * type="line"
31
+ * onClick={(data) => console.log(data)}
32
+ * onBrush={(range) => console.log(range)}
33
+ * />
34
+ * ```
35
+ *
36
+ * @see {@link https://adarshpastakia.github.io/react-fabric/?path=/docs/charts-timeseries--docs} for more details on the properties.
37
+ * @see {@link https://echarts.apache.org/en/option.html#series-line} for more details on the ECharts line series options.
38
+ * @see {@link https://echarts.apache.org/en/option.html#series-bar} for more details on the ECharts bar series options.
16
39
  */
17
40
  export declare const TimeSeries: FC<TimeSeriesProps>;
@@ -12,5 +12,25 @@ export interface TimeSliderProps extends BaseChart {
12
12
  }) => void;
13
13
  }
14
14
  /**
15
- * Chart to display time scale data with zoom and brush */
15
+ * TimeSlider component renders a time slider chart.
16
+ * It allows users to visualize time-based data and interactively select a range.
17
+ * The chart supports brushing to select a specific time range,
18
+ * and it emits an event when the range is changed.
19
+ *
20
+ * @param {TimeSliderProps} props - The properties for the TimeSlider component.
21
+ * @returns {JSX.Element} The rendered TimeSlider component.
22
+ *
23
+ * @example
24
+ * ```jsx
25
+ * <TimeSlider
26
+ * data={data}
27
+ * range={{ start: new Date("2023-01-01"), end: new Date("2023-12-31") }}
28
+ * onBrush={(range) => console.log("Selected range:", range)}
29
+ * />
30
+ * ```
31
+ *
32
+ * @see {@link https://adarshpastakia.github.io/react-fabric/?path=/docs/charts-timeslider--docs} for more details on the properties.
33
+ * @see {@link https://echarts.apache.org/en/option.html#dataZoom} for more details on the ECharts dataZoom feature.
34
+ * @see {@link https://echarts.apache.org/en/option.html#series-line} for more details on the ECharts line series.
35
+ */
16
36
  export declare const TimeSlider: FC<TimeSliderProps>;
@@ -4,6 +4,30 @@ export interface WordBubbleProps extends Omit<BaseChart, "theme">, CountType {
4
4
  onClick?: (key: string) => void;
5
5
  }
6
6
  /**
7
- * Chart to display simple word cloud
7
+ * WordBubble component renders a word cloud chart using ECharts.
8
+ * It displays words with sizes proportional to their frequency in the data.
9
+ * Users can click on words to trigger an action, such as filtering or navigating.
10
+ * It also supports exporting the chart and displays an empty state when no data is available.
11
+ *
12
+ * @param {WordBubbleProps} props - The properties for the WordBubble component.
13
+ * @returns {JSX.Element} The rendered WordBubble component.
14
+ *
15
+ * @example
16
+ * ```jsx
17
+ * <WordBubble
18
+ * data={[
19
+ * { id: "1", label: "Word One", count: 10 },
20
+ * { id: "2", label: "Word Two", count: 20 },
21
+ * { id: "3", label: "Word Three", count: 30 },
22
+ * ]}
23
+ * title="Word Frequency"
24
+ * onExport={() => console.log("Exporting chart...")}
25
+ * onClick={(key) => console.log("Clicked word:", key)}
26
+ * theme="light"
27
+ * />
28
+ * ```
29
+ *
30
+ * @see {@link https://adarshpastakia.github.io/react-fabric/?path=/docs/charts-wordbubble--docs} for the properties that can be passed to this component.
31
+ * @see {@link https://github.com/ecomfe/echarts-wordcloud} for the underlying chart implementation.
8
32
  */
9
33
  export declare const WordBubble: FC<WordBubbleProps>;