score:4
yes you can use js code in your typescript files but the compiler needs to know about the objects and libraries you use. you have two options to make this compile. either add the .d.ts file for your library or to fool the compiler you can declare the highcharts object yourself like this.
declare var highcharts: any;
var initializechart1 = function () {
require(['jquery', 'highcharts', 'highchartsmore', 'highchartsexporting'], function ($) {
$("#mychart").highcharts({
chart: {
type: 'spline',
backgroundcolor: '#ececec',
animation: highcharts.svg, // don't animate in old ie
Source: stackoverflow.com
Related Query
- JavaScript code inside TypeScript file .ts not working
- c# WPF Webbrowser with Highchart, Javascript from external source not working "An error has occurred in the script on this page"
- Javascript variable not working inside of highcharts
- Highcharts not working when pass the javascript variable as hightcharts series data
- Javascript not working when using async attribute : Highcharts
- Javascript setInterval/setTimeout not working when browser tab not focused
- Javascript not working after renaming asp.net page
- PHP Cache external JSON API in local file - not working
- uploading external csv file to highcharts not working
- Javascript HighCharts Pie color change not working
- Highcharts Javascript - Synchronize Chart and Table not working - Cant read property cell of undefined
- Javascript Code not running in Wordpress Pages
- Highcharts.js not working inside slick slider
- JavaScript - Chart does not show when is inside a div tag
- Javascript variable with Comma separated values not working in HighChart
- Rails production: javascript not working
- Highchart is not working with javascript
- Use django variable (array of elements from sqlite3 database) inside javascript embedded code
- zip two arrays in javascript not working to draw high chart
- Highchart javascript chart example not working
- Dynamically changing Highcharts Theme through Jquery code not working
- How can I read an Excel File with JavaScript (without ActiveXObject)
- Highcharts yAxis max not working
- Highcharts does not resize charts inside tabs
- HighCharts is undefined because multiple Html pages in Javascript file
- Drill Down (Highcharts) not working in Angular 5
- HighStock Charts not Working over SSL ie https
- Optimize JavaScript DrillDown code
- Resize highcharts using react-grid-layout not working
- React-highcharts scrollbar feature not working
More Query from same tag
- Google Charts creates a new line in graph instead of a Tooltip message.
- How can I load a custom popup on a click event in Highcharts?
- How to customize each column in Highcharts stacked column
- How to add comma formated labels for Y-axis in Highcharts?
- How to get selected date from highstock?
- dynamic highchart series based on click
- Highchart Heatmap remove empty rows on legend toggle
- Datalabels fontSize and position : different results depending on browser
- Update Data Point From Existing DataTable On Set Interval
- Highchart chart synchronisation showing console error while using highstock.js
- change datalabels color in a HighCharts chart when hovering without updating the series
- Highcharts Y Axis Tick Marks not setting
- Highstock graph showing data outside selected range
- How to enable scrollbar in highchart
- highcharts organization chart is throwing error when loading module
- Highcharts elements are not aligned
- highcharts: Add marker to a x-range chart
- HighStock Start Month rangeSelector And series.compare Not Working on Initial Load
- Highcharts Custom SVG Marker Symbol is Shaped Different in Legend
- R - highcharter - selective legends at display
- HighStock Print Setting To Hide Range Selector
- How to save a plot as image on disk from Viewer in RStudio?
- How to get the exported image without moving from the current window when using mobile devices
- R highcharter, valuebox, eventreactive didn't work together in shiny
- Highstock chart: navigator displays the wrong area in negative-color
- Highcharts - How to choose a range to display with javascript?
- highcharts bar graph layout issues
- How to draw a Highcharts in opened modal window by using ui-bootstrap directive?
- Change highcharts axis value based on User Selection
- Dynamic query for high charts