本文整理汇总了TypeScript中chartist.Interpolation.simple方法的典型用法代码示例。如果您正苦于以下问题:TypeScript Interpolation.simple方法的具体用法?TypeScript Interpolation.simple怎么用?TypeScript Interpolation.simple使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类chartist.Interpolation
的用法示例。
在下文中一共展示了Interpolation.simple方法的1个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的TypeScript代码示例。
示例1: ngOnInit
ngOnInit(){
var dataSales = {
labels: ['9:00AM', '12:00AM', '3:00PM', '6:00PM', '9:00PM', '12:00PM', '3:00AM', '6:00AM'],
series: [
[287, 385, 490, 562, 594, 626, 698, 895, 952],
[67, 152, 193, 240, 387, 435, 535, 642, 744],
[23, 113, 67, 108, 190, 239, 307, 410, 410]
]
};
var optionsSales = {
low: 0,
high: 1000,
showArea: true,
height: "245px",
axisX: {
showGrid: false,
},
lineSmooth: Chartist.Interpolation.simple({
divisor: 3
}),
showLine: true,
showPoint: false,
};
var responsiveSales: any[] = [
['screen and (max-width: 640px)', {
axisX: {
labelInterpolationFnc: function (value) {
return value[0];
}
}
}]
];
new Chartist.Line('#chartHours', dataSales, optionsSales, responsiveSales);
var data = {
labels: ['Jan', 'Feb', 'Mar', 'Apr', 'Mai', 'Jun', 'Jul', 'Aug', 'Sep', 'Oct', 'Nov', 'Dec'],
series: [
[542, 543, 520, 680, 653, 753, 326, 434, 568, 610, 756, 895],
[230, 293, 380, 480, 503, 553, 600, 664, 698, 710, 736, 795]
]
};
var options = {
seriesBarDistance: 10,
axisX: {
showGrid: false
},
height: "245px"
};
var responsiveOptions: any[] = [
['screen and (max-width: 640px)', {
seriesBarDistance: 5,
axisX: {
labelInterpolationFnc: function (value) {
return value[0];
}
}
}]
];
new Chartist.Line('#chartActivity', data, options, responsiveOptions);
var dataPreferences = {
series: [
[25, 30, 20, 25]
]
};
var optionsPreferences = {
donut: true,
donutWidth: 40,
startAngle: 0,
total: 100,
showLabel: false,
axisX: {
showGrid: false
}
};
new Chartist.Pie('#chartPreferences', dataPreferences, optionsPreferences);
new Chartist.Pie('#chartPreferences', {
labels: ['62%','32%','6%'],
series: [62, 32, 6]
});
}