import 'zone.js'; import 'reflect-metadata'; import { Component, enableProdMode, NgModule } from '@angular/core'; import { BrowserModule } from '@angular/platform-browser'; import { ViserModule } from 'viser-ng'; const data = [ { "term":"Zombieland","count":9 }, { "term":"Wieners","count":8 }, { "term":"Toy Story","count":8 }, { "term":"trashkannon","count":7 }, { "term":"the GROWLERS","count":6 }, { "term":"mudweiser","count":6 }, { "term":"ThunderCats","count":4 }, { "term":"The Taqwacores - Motion Picture","count":4 }, { "term":"The Shawshank Redemption","count":2 }, { "term":"The Olivia Experiment","count":1 }, ]; const scale = [{ dataKey: 'count', max: 2, }]; @Component({ selector: '#mount', template: `
` }) class AppComponent { forceFit: boolean = true; height: number = 400; data = data; scale = scale; guideTextStyle = { textAlign: 'center', fontSize: 24, fill: '#8543e0', }; guideTextPosition = ['50%', '50%']; barStyle = { lineAppendWidth: 10 }; getPosition = (obj) => { return [obj.term, 0]; } getContent = (obj) => { return obj.term.toString(); } } @NgModule({ declarations: [ AppComponent ], imports: [ BrowserModule, ViserModule ], providers: [], bootstrap: [ AppComponent ] }) export default class AppModule { }