Skip to content

Commit

Permalink
feat: fix bar size issue
Browse files Browse the repository at this point in the history
  • Loading branch information
phodal committed Mar 12, 2020
1 parent 05d7a2d commit 1c857cb
Showing 1 changed file with 8 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,6 @@ export class MarkdownChartComponent implements OnInit, AfterViewInit {
const myChart = echarts.init(this.reporter.nativeElement);
const builderJson = this.data.chartData;
const sortData = Object.keys(builderJson).map(key => builderJson[key]).sort((a, b) => a.value - b.value);
console.log(sortData)
myChart.setOption({
tooltip: {},
title: [{
Expand All @@ -45,7 +44,14 @@ export class MarkdownChartComponent implements OnInit, AfterViewInit {
series: [{
type: 'bar',
stack: 'chart',
data: sortData
data: sortData,
label: {
normal: {
show: true,
position: 'right',
formatter: data => data.value + '%'
}
}
}]
});
}
Expand Down

0 comments on commit 1c857cb

Please sign in to comment.