我有angular2和谷歌排行榜。
我的组件代码是:
playstoreRatingChart(data) {
let dateTitle: any = 'Date';
let ratingTitle: any = 'Rating';
let dataTable = [[dateTitle, ratingTitle, { "role": 'annotation' }, { role: 'style' }]];
data.playstore_rating.forEach(function (obj) {
let newDate = new Date(obj.year, obj.month-1, obj.day)
let rating = obj.rating;
let rowRating = Number(rating.toFixed(2));
let test = parseFloat(rating.toFixed(2));
let row = [newDate, test, test, 'width:22; stroke-color: #871B47; stroke-opacity: 0.6; stroke-width: 12; fill-color: #BC5679; fill-opacity: 0.2'];
dataTable.push(row)
});
this.testPlayStore = {
chartType: 'ColumnChart',
dataTable: dataTable,
bar: { groupWidth: '100%' }
}
}
我不知道,为什么,但确切地说这个图表(我在这个页面上有更多的图表)有1px宽度的列,我不能改变它的宽度。