From 75b53205ce569cb3b9568eadc08a7a4f8a94b45a Mon Sep 17 00:00:00 2001 From: dmitryshindin Date: Wed, 10 Jan 2018 22:20:15 +0300 Subject: [PATCH] Added bar.space as an optional property to ChartConfiguration interface (#22804) * Added bar.space as an optional property to ChartConfiguration interface This property lets you to set space between bars in bar charts * Add tests for new property --- types/c3/c3-tests.ts | 3 ++- types/c3/index.d.ts | 4 ++++ 2 files changed, 6 insertions(+), 1 deletion(-) diff --git a/types/c3/c3-tests.ts b/types/c3/c3-tests.ts index 509678636b..8ac8a4b93e 100644 --- a/types/c3/c3-tests.ts +++ b/types/c3/c3-tests.ts @@ -619,7 +619,8 @@ function chart_bar() { width: { ratio: 0.5, // this makes bar width 50% of length between ticks max: 50 // this limits maximum width of bar to 50px - } + }, + space: 10 // this adds space between bars in bar charts // or // width: 100 // this makes bar width 100px } diff --git a/types/c3/index.d.ts b/types/c3/index.d.ts index b06efa29f9..96ecc8c488 100644 --- a/types/c3/index.d.ts +++ b/types/c3/index.d.ts @@ -178,6 +178,10 @@ export interface ChartConfiguration { * Set if min or max value will be 0 on bar chart. */ zerobased?: boolean; + /** + * Set space between bars in bar charts + */ + space?: number; }; pie?: {