Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

ColumnRange chart is not working. #81

Closed
yaashaswi opened this issue Nov 1, 2017 · 3 comments
Closed

ColumnRange chart is not working. #81

yaashaswi opened this issue Nov 1, 2017 · 3 comments

Comments

@yaashaswi
Copy link

yaashaswi commented Nov 1, 2017

I have tried to add ColumnRange chart but it's giving "Highcharts error #17: www.highcharts.com/errors/17" Error.

`chart: {
type: 'columnrange',
inverted: true
},

        title: {
            text: 'Temperature variation by month'
        },

        subtitle: {
            text: 'Observed in Vik i Sogn, Norway'
        },

        xAxis: {
            categories: ['Jan', 'Feb', 'Mar', 'Apr', 'May', 'Jun', 'Jul', 'Aug', 'Sep', 'Oct', 'Nov', 'Dec']
        },

        yAxis: {
            title: {
                text: 'Temperature ( °C )'
            }
        },

        tooltip: {
            valueSuffix: '°C'
        },

        plotOptions: {
            columnrange: {
                dataLabels: {
                    enabled: true,
                    formatter: function () {
                        return this.y + '°C';
                    }
                }
            }
        },

        legend: {
            enabled: false
        },

        series: [{
            name: 'Temperatures',
            data: [
                [-9.7, 9.4],
                [-8.7, 6.5],
                [-3.5, 9.4],
                [-1.4, 19.9],
                [0.0, 22.6],
                [2.9, 29.5],
                [9.2, 30.7],
                [7.3, 26.5],
                [4.4, 18.0],
                [-3.1, 11.4],
                [-5.2, 10.4],
                [-13.5, 9.8]
            ]
        }]`
@cebor
Copy link
Owner

cebor commented Nov 2, 2017

I think you need to import some extra modules. See: https://github.com/cebor/angular-highcharts#using-highcharts-modules

@mblum14
Copy link

mblum14 commented Nov 29, 2017

I ran into the same problem. The "columnrange" chart type is defined in highcharts-more.src.js as opposed to under the modules directory.
you can import from highcharts/highcharts-more.src:

// app.module.ts
// ....
import more from 'highcharts/highcharts-more.src';

and just follow the directions in the link @cebor referenced.

@cebor cebor closed this as completed May 17, 2018
@keephacking
Copy link

@cebor , columnrange not workinging in angular 6 . https://stackblitz.com/edit/angular-highcharts-columnrange.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants