javascript - Create JSON object using TypeScript -
i have highcharts in code, used javascript massage info creating json object, code snippet looks like
var yearchartoptions = { chart: { renderto: 'yearchartcontainer', type: 'column', margin: [ 50, 50, 50, 50] }, title: { text: '' }, xaxis: { categories: [], labels: { rotation: -90, align: 'right' } }, yaxis: { title: { text: '' }, plotlines: [{ color: '#ff0000', width: 2, label: { style: { color: 'blue', fontweight: 'bold', zindex: -1 }, formatter: function () { homecoming '$' + highcharts.numberformat(this.value/1000, 0) +'k '; } }, zindex: 10 }] }, }; // create chart var yearchart = new highcharts.chart(yearchartoptions);
how can write in typescript have same javascript result?
add /// <reference path="highcharts.d.ts" />
tag file. can file definitelytyped. should work there.
javascript typescript
No comments:
Post a Comment