@@ -7,7 +7,10 @@ import { NonCancelableEventHandler } from "../internal/events";
77// CartesianChartProps is the type for CartesianChart React component properties. Unlike in Highcharts API,
88// we pass options directly to the component, instead of grouping them all into a single "options" property.
99// We do still organize related options in groups, e.g.: "SeriesOptions", "TooltipOptions".
10- export interface CartesianChartProps extends CoreTypes . BaseChartOptions , CoreTypes . CoreCartesianOptions {
10+ export interface CartesianChartProps
11+ extends CoreTypes . BaseChartOptions ,
12+ CoreTypes . CoreCartesianOptions ,
13+ CoreTypes . WithCartesianI18nStrings {
1114 /**
1215 * Inverts X and Y axes. Use it to show horizontal columns (bars).
1316 * This property corresponds to [chart.inverted](https://api.highcharts.com/highcharts/chart.inverted).
@@ -21,7 +24,7 @@ export interface CartesianChartProps extends CoreTypes.BaseChartOptions, CoreTyp
2124 stacking ?: "normal" ;
2225
2326 /**
24- * Chart series options.
27+ * Defines series options of the chart .
2528 * This property corresponds to [series](https://api.highcharts.com/highcharts/series), and extends it
2629 * with two additional series types: "x-threshold", and "y-threshold".
2730 *
@@ -39,31 +42,29 @@ export interface CartesianChartProps extends CoreTypes.BaseChartOptions, CoreTyp
3942 series : readonly CartesianChartProps . SeriesOptions [ ] ;
4043
4144 /**
42- * Chart tooltip options.
43- *
44- * Supported options:
45+ * Defines tooltip options of the chart, including:
4546 * * `enabled` - (optional, boolean) - Hides the tooltip.
4647 * * `size` - (optional, "small" | "medium" | "large") - Specifies max tooltip size.
4748 * * `placement` - (optional, "middle" | "outside") - Specifies preferred tooltip placement.
4849 * * `point` - (optional, function) - Customizes tooltip series point rendering.
49- * * `header` - (optional, function) - Provides a custom tooltip header.
50- * * `body` - (optional, function) - Provides a custom tooltip content .
51- * * `footer` - (optional, function) - Adds a tooltip footer.
50+ * * `header` - (optional, function) - Renders a custom tooltip header.
51+ * * `body` - (optional, function) - Renders a custom tooltip body .
52+ * * `footer` - (optional, function) - Renders a custom tooltip footer.
5253 */
5354 tooltip ?: CartesianChartProps . TooltipOptions ;
5455
5556 /**
56- * X-axis options.
57+ * Defines options of the chart's x axis .
5758 * This property corresponds to [xAxis](https://api.highcharts.com/highcharts/xAxis), and extends it
5859 * with a custom value formatter.
5960 *
6061 * Supported options:
6162 * * `title` (optional, string) - Axis title.
62- * * `type` (optional, ' linear' | ' datetime' | ' category' | ' logarithmic' ) - Axis type.
63- * * * linear - Uses continuous proportional values scale.
64- * * * datetime - Similar to linear, but takes epoch time as values.
65- * * * category - Uses discrete scale, requires `categories` to be set.
66- * * * logarithmic - Uses continuous logarithmic values scale.
63+ * * `type` (optional, " linear" | " datetime" | " category" | " logarithmic" ) - Axis type.
64+ * * * " linear" - Uses continuous proportional values scale.
65+ * * * " datetime" - Similar to linear, but takes epoch time as values.
66+ * * * " category" - Uses discrete scale, requires `categories` to be set.
67+ * * * " logarithmic" - Uses continuous logarithmic values scale.
6768 * * `min` (optional, number) - Axis min value boundary.
6869 * * `max` (optional, number) - Axis max value boundary.
6970 * * `tickInterval` (optional, number) - Distance between axis ticks.
@@ -74,52 +75,49 @@ export interface CartesianChartProps extends CoreTypes.BaseChartOptions, CoreTyp
7475 xAxis ?: CartesianChartProps . XAxisOptions ;
7576
7677 /**
77- * Y-axis options.
78+ * Defines options of the chart's y axis .
7879 * This property corresponds to [xAxis](https://api.highcharts.com/highcharts/yAxis), and extends it
7980 * with a custom value formatter.
8081 *
8182 * Supported options:
8283 * * `title` (optional, string) - Axis title.
83- * * `type` (optional, ' linear' | ' datetime' | ' category' | ' logarithmic' ) - Axis type.
84- * * * linear - Uses continuous proportional values scale.
85- * * * datetime - Similar to linear, but takes epoch time as values.
86- * * * category - Uses discrete scale, requires `categories` to be set.
87- * * * logarithmic - Uses continuous logarithmic values scale.
84+ * * `type` (optional, " linear" | " datetime" | " category" | " logarithmic" ) - Axis type.
85+ * * * " linear" - Uses continuous proportional values scale.
86+ * * * " datetime" - Similar to linear, but takes epoch time as values.
87+ * * * " category" - Uses discrete scale, requires `categories` to be set.
88+ * * * " logarithmic" - Uses continuous logarithmic values scale.
8889 * * `min` (optional, number) - Axis min value boundary.
8990 * * `max` (optional, number) - Axis max value boundary.
9091 * * `tickInterval` (optional, number) - Distance between axis ticks.
9192 * * `categories` (optional, Array<string>) - Predefined list of values, used for categorical axis type.
9293 * * `reversedStacks` (optional, boolean) - Reverts series order in stacked series.
9394 * * `valueFormatter` (optional, function) - Takes axis tick as input and returns a formatted string. This formatter also
94- * applies to the tooltip series value .
95+ * applies to the tooltip points values .
9596 */
9697 yAxis ?: CartesianChartProps . YAxisOptions ;
9798
9899 /**
99- * Specifies visible series by their IDs. When unset, all series are visible by default, and the visibility state
100- * is managed internally by the component. When a series does not have an ID, its name is used instead.
101- * When the property is provided, use `onChangeVisibleSeries` to manage state updates.
100+ * Specifies which series to show using their IDs. By default, all series are visible and managed by the component.
101+ * If a series doesn't have an ID, its name is used. When using this property, manage state updates with `onVisibleSeriesChange`.
102102 */
103103 visibleSeries ?: readonly string [ ] ;
104104
105105 /**
106- * A callback, triggered when series visibility changes as result of user interacting with the legend or filter.
107- */
108- onChangeVisibleSeries ?: NonCancelableEventHandler < { visibleSeries : string [ ] } > ;
109-
110- /**
111- * An object that contains all of the localized strings required by the component.
112- * @i 18n
106+ * A callback function, triggered when series visibility changes as a result of user interaction with the legend or filter.
113107 */
114- i18nStrings ?: CoreTypes . CartesianI18nStrings ;
108+ onVisibleSeriesChange ?: NonCancelableEventHandler < { visibleSeries : string [ ] } > ;
115109}
116110
117111export namespace CartesianChartProps {
118112 export interface Ref {
119- // Controls series visibility that works with both controlled and uncontrolled visibility mode.
113+ /**
114+ * Controls series visibility and works with both controlled and uncontrolled visibility modes.
115+ */
120116 setVisibleSeries ( visibleSeries : readonly string [ ] ) : void ;
121- // Same as `setVisibleSeries`, but applies to all series and requires no series IDs on input. This is useful when
122- // implementing clear-filter action in no-match state.
117+ /**
118+ * Functions similarly to `setVisibleSeries`, but applies to all series and doesn't require series IDs as input.
119+ * Use this when implementing clear-filter actions in no-match states.
120+ */
123121 showAllSeries ( ) : void ;
124122 }
125123
0 commit comments