Skip to content

Commit

Permalink
docs: update description for rectStyle
Browse files Browse the repository at this point in the history
  • Loading branch information
markov00 committed Apr 13, 2021
1 parent a0106fe commit 27f5971
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 4 deletions.
6 changes: 4 additions & 2 deletions src/utils/themes/theme.ts
Original file line number Diff line number Diff line change
Expand Up @@ -399,9 +399,11 @@ export interface RectStyle {
fill?: Color | ColorVariant;
/** the opacity of each rect on the theme/series */
opacity: number;
/** The width of the rect in pixel */
/** The width of the rect in pixel. If expressed together with `widthRatio` then the `widthRatio`
* will express the max available size, where the `widthPixel` express the derived/min width. */
widthPixel?: Pixels;
/** The ratio of the width limited to [0,1] */
/** The ratio of the width limited to [0,1]. If expressed together with `widthPixel` then the `widthRatio`
* will express the max available size, where the `widthPixel` express the derived/min width. */
widthRatio?: Ratio;
}

Expand Down
4 changes: 2 additions & 2 deletions stories/stylings/10_custom_bars.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@
import { boolean, color, number } from '@storybook/addon-knobs';
import React from 'react';

import { Axis, BarSeries, Chart, Position, ScaleType, Settings, RecursivePartial, Theme } from '../../src';
import { Axis, BarSeries, Chart, Position, ScaleType, Settings, PartialTheme } from '../../src';
import * as TestDatasets from '../../src/utils/data_samples/test_dataset';

function range(title: string, min: number, max: number, value: number, groupId?: string, step = 1) {
Expand Down Expand Up @@ -55,7 +55,7 @@ export const Example = () => {
},
};

const theme: RecursivePartial<Theme> = {
const theme: PartialTheme = {
barSeriesStyle: {
rectBorder: {
stroke: color('theme border stroke', 'red', 'Chart Global Theme'),
Expand Down

0 comments on commit 27f5971

Please sign in to comment.