adding typing for tooltip order (#22997)

This commit is contained in:
Eugenio Arosteguy
2018-01-23 10:54:43 -08:00
committed by Andy
parent f08ddbb734
commit 3499d8a0d9
2 changed files with 18 additions and 0 deletions
+14
View File
@@ -1847,6 +1847,20 @@ function tooltip_format() {
});
}
function tooltip_order() {
const chart = c3.generate({
data: {
columns: [
["data1", 30, 200, 100, 400, 150, 250],
["data2", 50, 20, 10, 40, 15, 25]
]
},
tooltip: {
order: 'asc'
}
});
}
////////////////////////
// Chart options Tests
////////////////////////
+4
View File
@@ -737,6 +737,10 @@ export interface TooltipOptions {
* Specified function receives data, defaultTitleFormat, defaultValueFormat and color of the data point to show. If tooltip.grouped is true, data includes multiple data points.
*/
contents?(data: any, defaultTitleFormat: string, defaultValueFormat: string, color: any): string;
/**
* Set tooltip values order
*/
order?: string | any[] | ((data: Data) => boolean);
}
export interface SubchartOptions {