( seriesConfigs: ReadonlyArray<ResolvedBarSeriesConfig>, )
| 258 | }>; |
| 259 | |
| 260 | const computeSharedBarLayout = ( |
| 261 | seriesConfigs: ReadonlyArray<ResolvedBarSeriesConfig>, |
| 262 | ): BarSharedLayout => { |
| 263 | let barWidth: number | string | undefined = undefined; |
| 264 | let barGap: number | undefined = undefined; |
| 265 | let barCategoryGap: number | undefined = undefined; |
| 266 | |
| 267 | for (let i = 0; i < seriesConfigs.length; i++) { |
| 268 | const s = seriesConfigs[i]; |
| 269 | if (barWidth === undefined && s.barWidth !== undefined) barWidth = s.barWidth; |
| 270 | if (barGap === undefined && s.barGap !== undefined) barGap = s.barGap; |
| 271 | if (barCategoryGap === undefined && s.barCategoryGap !== undefined) barCategoryGap = s.barCategoryGap; |
| 272 | } |
| 273 | |
| 274 | return { barWidth, barGap, barCategoryGap }; |
| 275 | }; |
| 276 | |
| 277 | export type BarLayoutPx = Readonly<{ |
| 278 | categoryStep: number; |
no outgoing calls
no test coverage detected