Add width property to tick configuration (#23196)

This commit is contained in:
dmitryshindin
2018-01-25 21:51:38 +03:00
committed by Andy
parent 6361a8f219
commit 5ec69dfcc8
2 changed files with 27 additions and 1 deletions

View File

@@ -152,7 +152,8 @@ function axis_examples() {
fit: true,
values: [1, 2, 4, 8, 16, 32],
rotate: 60,
outer: false
outer: false,
width: 100
},
max: 100,
min: -100,
@@ -940,6 +941,26 @@ function axes_x_tick_fit() {
});
}
function axes_x_tick_width() {
const chart = c3.generate({
data: {
x: "x",
columns: [
["x", "2013-10-31", "2013-12-31", "2014-01-31", "2014-02-28"],
["sample", 30, 100, 400, 150],
]
},
axis: {
x: {
type: "bar",
tick: {
width: 100
}
}
}
});
}
function axes_x_localtime() {
const chart = c3.generate({
data: {

5
types/c3/index.d.ts vendored
View File

@@ -3,6 +3,7 @@
// Definitions by: Marc Climent <https://github.com/mcliment>
// Gerin Jacob <https://github.com/gerinjacob>
// Bernd Hacker <https://github.com/denyo>
// Dzmitry Shyndzin <https://github.com/dmitryshindin>
// Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped
// TypeScript Version: 2.1
@@ -585,6 +586,10 @@ export interface XTickConfiguration {
* Show x axis outer tick.
*/
outer?: boolean;
/**
* Set width of x axis tick.
*/
width?: number;
multiline?: boolean; // Undocumented
}