lachlan
lachlan

Reputation: 63

Explain Highcharts different Instantiations

I have a perfectly good Highcharts example that is initiated with the code commencing:

$(function () {
    $('#container').highcharts({
        chart: {
            type: 'line'
        },

When I replace this with the following code it does not work.

$(document).ready(function() {
var chart1 = new Highcharts.Chart({
        chart: {
       renderTo: '#container1,
            type: 'line'
        },

Can someone explain the difference, and why it does not work? as I said, all the other code is absolutley identical and works fine for the first example

Upvotes: 0

Views: 69

Answers (1)

colestrode
colestrode

Reputation: 10658

You're missing the closing quote in the renderTo option.

renderTo: '#container1',

Also, your container ID's are different (container vs container1). Not sure if that was intentional.

Upvotes: 2

Related Questions