Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 5 additions & 0 deletions src/types/index.d.ts
Original file line number Diff line number Diff line change
Expand Up @@ -107,6 +107,11 @@ export interface BarControllerDatasetOptions
*/
yAxisID: string;

/**
* Should null or undefined values be omitted from drawing
*/
skipNull?: boolean;

/**
* Percent (0-1) of the available width each bar should be within the category width. 1.0 will take the whole category width and put the bars right next to each other.
* @default 0.9
Expand Down
12 changes: 12 additions & 0 deletions test/types/controllers/bar_skip_null.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
import { Chart } from '../../../src/types.js';

const chart = new Chart('id', {
type: 'bar',
data: {
labels: ['1', '2', '3'],
datasets: [{
data: [1, 2, 3],
skipNull: true
}]
},
});