Skip to content

Commit

Permalink
[docs] Fix the description of
Browse files Browse the repository at this point in the history
  • Loading branch information
alexfauquette committed Jun 3, 2024
1 parent c4c0b18 commit 44024cd
Show file tree
Hide file tree
Showing 6 changed files with 15 additions and 9 deletions.
2 changes: 1 addition & 1 deletion docs/translations/api-docs/charts/axis-config.json
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@
"stroke": { "description": "The stroke color of the axis line." },
"tickFontSize": { "description": "The font size of the axis ticks text." },
"tickInterval": {
"description": "Defines which ticks are displayed. Its value can be:<br />- &#39;auto&#39; In such case the ticks are computed based on axis scale and other parameters.<br />- a filtering function of the form <code>(value, index) =&amp;gt; boolean</code> which is available only if the axis has a data property.<br />- an array containing the values where ticks should be displayed."
"description": "Defines which ticks are displayed.<br />Its value can be:<br />- &#39;auto&#39; In such case the ticks are computed based on axis scale and other parameters.<br />- a filtering function of the form <code>(value, index) =&amp;gt; boolean</code> which is available only if the axis has &quot;point&quot; scale.<br />- an array containing the values where ticks should be displayed."
},
"tickLabelInterval": {
"description": "Defines which ticks get its label displayed. Its value can be:<br />- &#39;auto&#39; In such case, labels are displayed if they do not overlap with the previous one.<br />- a filtering function of the form (value, index) =&gt; boolean. Warning: the index is tick index, not data ones."
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@
"stroke": { "description": "The stroke color of the axis line." },
"tickFontSize": { "description": "The font size of the axis ticks text." },
"tickInterval": {
"description": "Defines which ticks are displayed. Its value can be: - &#39;auto&#39; In such case the ticks are computed based on axis scale and other parameters. - a filtering function of the form <code>(value, index) =&gt; boolean</code> which is available only if the axis has a data property. - an array containing the values where ticks should be displayed."
"description": "Defines which ticks are displayed. Its value can be: - &#39;auto&#39; In such case the ticks are computed based on axis scale and other parameters. - a filtering function of the form <code>(value, index) =&gt; boolean</code> which is available only if the axis has &quot;point&quot; scale. - an array containing the values where ticks should be displayed."
},
"tickLabelInterval": {
"description": "Defines which ticks get its label displayed. Its value can be: - &#39;auto&#39; In such case, labels are displayed if they do not overlap with the previous one. - a filtering function of the form (value, index) =&gt; boolean. Warning: the index is tick index, not data ones."
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@
"stroke": { "description": "The stroke color of the axis line." },
"tickFontSize": { "description": "The font size of the axis ticks text." },
"tickInterval": {
"description": "Defines which ticks are displayed. Its value can be: - &#39;auto&#39; In such case the ticks are computed based on axis scale and other parameters. - a filtering function of the form <code>(value, index) =&gt; boolean</code> which is available only if the axis has a data property. - an array containing the values where ticks should be displayed."
"description": "Defines which ticks are displayed. Its value can be: - &#39;auto&#39; In such case the ticks are computed based on axis scale and other parameters. - a filtering function of the form <code>(value, index) =&gt; boolean</code> which is available only if the axis has &quot;point&quot; scale. - an array containing the values where ticks should be displayed."
},
"tickLabelInterval": {
"description": "Defines which ticks get its label displayed. Its value can be: - &#39;auto&#39; In such case, labels are displayed if they do not overlap with the previous one. - a filtering function of the form (value, index) =&gt; boolean. Warning: the index is tick index, not data ones."
Expand Down
6 changes: 4 additions & 2 deletions packages/x-charts/src/ChartsXAxis/ChartsXAxis.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -315,10 +315,12 @@ ChartsXAxis.propTypes = {
*/
tickFontSize: PropTypes.number,
/**
* Defines which ticks are displayed. Its value can be:
* Defines which ticks are displayed.
* Its value can be:
* - 'auto' In such case the ticks are computed based on axis scale and other parameters.
* - a filtering function of the form `(value, index) => boolean` which is available only if the axis has a data property.
* - a filtering function of the form `(value, index) => boolean` which is available only if the axis has "point" scale.
* - an array containing the values where ticks should be displayed.
* @see See {@link https://mui.com/x/react-charts/axis/#fixed-tick-positions}
* @default 'auto'
*/
tickInterval: PropTypes.oneOfType([PropTypes.oneOf(['auto']), PropTypes.array, PropTypes.func]),
Expand Down
6 changes: 4 additions & 2 deletions packages/x-charts/src/ChartsYAxis/ChartsYAxis.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -255,10 +255,12 @@ ChartsYAxis.propTypes = {
*/
tickFontSize: PropTypes.number,
/**
* Defines which ticks are displayed. Its value can be:
* Defines which ticks are displayed.
* Its value can be:
* - 'auto' In such case the ticks are computed based on axis scale and other parameters.
* - a filtering function of the form `(value, index) => boolean` which is available only if the axis has a data property.
* - a filtering function of the form `(value, index) => boolean` which is available only if the axis has "point" scale.
* - an array containing the values where ticks should be displayed.
* @see See {@link https://mui.com/x/react-charts/axis/#fixed-tick-positions}
* @default 'auto'
*/
tickInterval: PropTypes.oneOfType([PropTypes.oneOf(['auto']), PropTypes.array, PropTypes.func]),
Expand Down
6 changes: 4 additions & 2 deletions packages/x-charts/src/hooks/useTicks.ts
Original file line number Diff line number Diff line change
Expand Up @@ -21,10 +21,12 @@ export interface TickParams {
*/
tickNumber?: number;
/**
* Defines which ticks are displayed. Its value can be:
* Defines which ticks are displayed.
* Its value can be:
* - 'auto' In such case the ticks are computed based on axis scale and other parameters.
* - a filtering function of the form `(value, index) => boolean` which is available only if the axis has a data property.
* - a filtering function of the form `(value, index) => boolean` which is available only if the axis has "point" scale.
* - an array containing the values where ticks should be displayed.
* @see See {@link https://mui.com/x/react-charts/axis/#fixed-tick-positions}
* @default 'auto'
*/
tickInterval?: 'auto' | ((value: any, index: number) => boolean) | any[];
Expand Down

0 comments on commit 44024cd

Please sign in to comment.