I am new to typescript and I tried to configure typescript Project in Visual studio 2015 as an HTML application with Typescript. My problem is how to import or reference the main diagrams without errors. I need a brief description of how to configure easist highchart in my typescript file. The description should be explained from the very beginning.
1) creating a project and adding Highchart to the project (npm, tsd ...),
2) by creating the index.html file and app.ts (or the name of your typescript file),
3) adding links to the html and app.ts file, especially in app.ts, where you install import or links, for example, using the import statement or
< reference path="typings/tsd.d.ts" /> < reference path="typings/highcharts/highcharts.d.ts" />
4) Set the required statements and put in a variable (I can't get this code to work ... Please use your way to do this
var Highcharts = require('highcharts'); // Load module after Highcharts is loaded require('highcharts/modules/exporting')(Highcharts); // Create the chart Highcharts.chart('container', { });
5) Finally, you make highchart either in app.ts or using the identifier in the index.html file
<div id="container" style="width:100%; height:400px;"></div>
I hope someone can help me here. I could, of course, do all this in index.html, but I want to use the debugging features in Typescript.
source share