Skip to content
This repository has been archived by the owner on Feb 6, 2024. It is now read-only.

Commit

Permalink
feat: add support for bar chart
Browse files Browse the repository at this point in the history
  • Loading branch information
peterpeterparker committed Dec 21, 2018
1 parent e62dbd3 commit 119615d
Showing 1 changed file with 12 additions and 4 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,8 @@ import {DeckdeckgoUtils} from '../../utils/deckdeckgo-utils';

enum DeckdeckgoSlideChartType {
LINE = 'line',
PIE = 'pie'
PIE = 'pie',
BAR = 'bar'
}

@Component({
Expand Down Expand Up @@ -122,10 +123,17 @@ export class DeckdeckgoSlideChart implements DeckdeckgoSlide {

private renderChart() {
if (this.type === DeckdeckgoSlideChartType.LINE) {
return <deckgo-line-chart width={this.chartWidth} height={this.chartHeight} src={this.src} separator={this.separator}
return <deckgo-line-chart width={this.chartWidth} height={this.chartHeight} src={this.src}
separator={this.separator}
date-pattern={this.datePattern} y-axis-domain={this.yAxisDomain}
margin-top={this.marginTop} margin-bottom={this.marginBottom} margin-right={this.marginRight} margin-left={this.marginLeft}
smooth={this.smooth} area={this.area} ticks={this.ticks} grid={this.grid}></deckgo-line-chart>
margin-top={this.marginTop} margin-bottom={this.marginBottom}
margin-right={this.marginRight} margin-left={this.marginLeft}
smooth={this.smooth} area={this.area} ticks={this.ticks}
grid={this.grid}></deckgo-line-chart>
} else if (this.type === DeckdeckgoSlideChartType.BAR) {
return <deckgo-bar-chart width={this.chartWidth} height={this.chartHeight} src={this.src} separator={this.separator}
margin-top={this.marginTop} margin-bottom={this.marginBottom}
margin-right={this.marginRight} margin-left={this.marginLeft}></deckgo-bar-chart>
} else {
return <deckgo-pie-chart width={this.chartWidth} height={this.chartHeight} src={this.src} separator={this.separator}
inner-radius={this.innerRadius} range={this.range}></deckgo-pie-chart>
Expand Down

0 comments on commit 119615d

Please sign in to comment.