score:0
Your html code doesn't show a reference to your own chart1.js file.
score:2
you should include jquery in your html file:
<script src="//ajax.googleapis.com/ajax/libs/jquery/1.7.1/jquery.min.js"
and it will work.
score:20
Use the code below and put it in a .html file (example: Chart.html)
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01//EN" "http://www.w3.org/TR/html4/strict.dtd">
<html>
<head>
<title>
Chart
</title>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
<script src="http://code.jquery.com/jquery-1.9.1.js" type="text/javascript"></script>
<script src="http://code.highcharts.com/highcharts.js" type="text/javascript"></script>
<script src="http://code.highcharts.com/modules/exporting.js" type="text/javascript"></script>
<script type="text/javascript">
$(function() {
$('#container').highcharts({
title: {
text: 'Monthly Average Temperature',
x: -20 //center
},
subtitle: {
text: 'Source: WorldClimate.com',
x: -20
},
xAxis: {
categories: ['Jan', 'Feb', 'Mar', 'Apr', 'May', 'Jun',
'Jul', 'Aug', 'Sep', 'Oct', 'Nov', 'Dec']
},
yAxis: {
title: {
text: 'Temperature (°C)'
},
plotLines: [{
value: 0,
width: 1,
color: '#808080'
}]
},
tooltip: {
valueSuffix: '°C'
},
legend: {
layout: 'vertical',
align: 'right',
verticalAlign: 'middle',
borderWidth: 0
},
series: [{
name: 'Tokyo',
data: [7.0, 6.9, 9.5, 14.5, 18.2, 21.5, 25.2, 26.5, 23.3, 18.3, 13.9, 9.6]
}, {
name: 'New York',
data: [-0.2, 0.8, 5.7, 11.3, 17.0, 22.0, 24.8, 24.1, 20.1, 14.1, 8.6, 2.5]
}, {
name: 'Berlin',
data: [-0.9, 0.6, 3.5, 8.4, 13.5, 17.0, 18.6, 17.9, 14.3, 9.0, 3.9, 1.0]
}, {
name: 'London',
data: [3.9, 4.2, 5.7, 8.5, 11.9, 15.2, 17.0, 16.6, 14.2, 10.3, 6.6, 4.8]
}]
});
});
</script>
</head>
<body>
<div id="container" style="min-width: 400px; height: 400px; margin: 0 auto"></div>
</body>
</html>
Change the reference of the files below to your local files path
<script src="http://code.jquery.com/jquery-1.9.1.js" type="text/javascript"></script>
<script src="http://code.highcharts.com/highcharts.js" type="text/javascript"></script>
<script src="http://code.highcharts.com/modules/exporting.js" type="text/javascript"></script>
I hope this help.
Source: stackoverflow.com
Related Query
- Trying to get highchart example working on local machine
- I had follow someone code samples and try apply to my HighChart program but I can't get it work at all
- Can not get highchart to display on page - only example will display
- I'm trying to use HighChart map and solid guage they both work for my data independetly but I get get lot of errors on I put them on a file
- Highchart example not working in seperate html page
- I am trying to include india map in my highchart code
- Highchart javascript chart example not working
- Trying to get Gridster to call functions like disable but $('.gridster ul').gridster().data('gridster'); not working
- Highchart is not working on Google chrome
- Get X Axis value on bar Highchart click event
- How to get Highchart Gauge to work in Sencha Touch 2
- JavaScript code inside TypeScript file .ts not working
- Django - can't get highchart to display data
- using angular directive to draw highchart pie chart but when i am using it in success function it is not working
- unable to get highcharts working in Rails
- Highcharts not working on Heroku environment, works on local environment
- In highchart Y-axis plotline labels get cut off
- Highchart is not working in jquery function
- c# WPF Webbrowser with Highchart, Javascript from external source not working "An error has occurred in the script on this page"
- Highcharts map example not working
- Is there a way to get superscripts to show up in highchart exports
- trying to dynamically update Highchart column chart but series undefined
- Javascript/Jquery/Gantt Highchart : On clicking over a task progress pop-up should get open
- Cannot get a series highchart
- HighChart with large amount of data not working
- Second popup representing Highchart not working on leaflet geojson polygon
- Highchart is not showing in heroku, but works in local environment
- what means ${demo.css} in example files of highcharts ? That piece of code seems to be literal
- Get base64 image from public highchart export server
- Highchart offline export trying to loading libs from online cdn and errors out
More Query from same tag
- How to extend a line series as dotted only when checkbox is clicked?
- highchart place x-axis labels in between ticks on a datetime axis
- Highcharts chart redraw while exporting
- Force last label and tick on x-axis
- Highchart's error : Uncaught SyntaxError: Unexpected token for
- displaying highchart's graphic
- How to expand the Connector of ORG Chart
- DotNet.Highcharts and proper JSON
- Highcharts .getJSON - chart not plotting
- Highcharts: scroll for text area inside highcharts container; custom table inside highcharts container
- Multiple time series in stacked column chart
- Highcharts: Dual axis chart with xAxis categories in legend?
- How can I group different series by different units using rangeSelector?
- Highcharts: collecting all charts on a page second time produces error
- Dynamically graph points with Highcharts
- Get y point from x given point hightcharts
- Highchart polar with additional pie series below
- Distance between x-axis labels and the chart in Highcharts
- Highcharts: x-value as date
- trouble plotting multiple series of data on highstock
- how do i redraw only the Highchart with new API that depends on my Select Option Parameter?
- Plotting data using highcharts piechart in flask web application
- HighCharts adding a multi-select dropdown for each column of a series
- Shape of Call out for timeline chart
- How to plot x axis next to 0th y axis tick label in case of negative data?
- Avoid overlapping in highchart bubble chart
- Parse CSV for multiple categories in Highcharts
- Highcharts how to pass milliseconds to pointStart (really a javascript question)
- R efficient Drilldown chart with loop using Highchart
- Remove onhover effect from column chart