Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 8839219
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 14, 20262026-06-14T10:11:27+00:00 2026-06-14T10:11:27+00:00

I have a chart that displays series data by year. eg 1011, 1112, 1213,

  • 0

I have a chart that displays series data by year.
eg 1011, 1112, 1213, 1415, and shows an actual and target for each year.

If the user clicks on a column, the chart drills down into that dataset, however I’d like to be able to show Actual and Target next to each other, rather than a single column…

JSFiddle: http://jsfiddle.net/MuydK/

Any help appreciated, am stumped on this as tried several methods.
I believe I understand how to set up the data into a series set rather than just a dataset, but don’t know what changes I need to make to SetChart etc…

Also the Series titles disappear once I’ve drilled in and out once, any ideas…?

Many Thanks for you help.

        var chart;
    $(document).ready(function () {
        var colors = Highcharts.getOptions().colors,
        categories1 = ['1011', '1112', '1213', '1415'],
        name1 = 'Actual',

        data1 = [ ...
  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-14T10:11:28+00:00Added an answer on June 14, 2026 at 10:11 am

    I updated your code with simple data, I think this is what you want,This is just a demo you can update code according to you.

    JSFiddle

    Here is code:

    $(function () {
            var chart;
            $(document).ready(function () {
                var colors = Highcharts.getOptions().colors,
                categories1 = ['1011', '1112', '1213', '1415'],
                name1 = 'Actual',
    
                data1 = [
    {
         y: 1674,
         color: colors[0],
         drilldown: {
             name: '1011 Actual',
             categories: ['BS', 'B', 'IT', 'C'],
             data: [3, 32, 54, 50],
    
             color: colors[0],
    
             name1: '1011 Target',
             data1: [0, 31, 50, 60],
             color1:colors[1]
         }
     }
    ];            var colors = Highcharts.getOptions().colors,
                categories2 = ['1011', '1112', '1213', '1415'],
                name2 = 'Target',
    
                data2 = [  
    {
         y: 1633,
         color: colors[1],
         drilldown: {
              name: '1011 Actual',
             categories: ['BS', 'B', 'IT', 'C'],
             data: [3, 32, 54, 50],
    
             color: colors[0],
    
             name1: '1011 Target',
             data1: [0, 31, 50, 60],
             color1:colors[1]
         }
     }
    ];            function setChart(name, categories, data, color) {
                    console.log(name, categories, data, color);
                    chart.xAxis[0].setCategories(categories);
                    while (chart.series.length > 0) {
                        chart.series[0].remove(true);
                    }
                    for (var i = 0; i < data.length; i++) {
                        chart.addSeries({
                            name: name[i],
                            data: data[i],
                            color: color[i]
                        });
    
                    }
                }
                chart = new Highcharts.Chart({
                    chart: {
                        renderTo: 'con1',
                        type: 'column'
                    },
                    title: {
                        text: 'Learner Responsive 16-18'
                    },
                    subtitle: {
                        text: 'Click the columns to view breakdown by department. Click again to view by Academic Year.'
                    },
                    xAxis: {
                        categories: categories1
                        , labels: {rotation:-90, align:'right'}
                    },
                    yAxis: {
                        title: {
                            text: 'Learner Responsive 16-18'
                        }
                    },
    
                    plotOptions: {
                        column: {
                            cursor: 'pointer',
                            point: {
                                events: {
                                    click: function () {
                                        var drilldown = this.drilldown;
                                        if (drilldown) { // drill down
                                            setChart([drilldown.name,drilldown.name1], drilldown.categories, [drilldown.data, drilldown.data1], [drilldown.color,drilldown.color1]);
                                        } else { // restore
                                            setChart(name, categories1, [data1, data2], 'white');
                                        }
                                    }
                                }
                            },
    
                            dataLabels: {
                                enabled: true,
                                color: colors[0],
                                style: {
                                    fontWeight: 'bold'
                                },
                                formatter: function () {
                                    return this.y; // +'%';
                                }
                            }
                        }
                    },
    
                    tooltip: {
                        formatter: function () {
                            var point = this.point,
                            series = point.series,
                            s = 'Learner Responsive 16-18' + '<br/>' + this.x + ' ' + series.name + ' is <b>' + this.y + '</b><br/>';
                            if (point.drilldown) {
                                s += 'Click to view <b>' + point.category + ' ' + series.name + ' </b>' + ' by department';
                            } else {
                                s += 'Click to return to view by academic year.';
                            }
                            return s;
                        }
                    },
    
                    series: [{
                        name: name1,
                        data: data1,
                        color: colors[0]
                    },{
                        name: name2,
                        data: data2,
                        color: colors[1]
                    }],
    
                    exporting: {
                        enabled: false
                    }
                },
                    function (chart) {
                    console.log(chart);
                });
            });
        });
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I have written a chart that displays financial data. Performance was good while I
I have a web page that displays a chart with a lot of data
I have to following code which displays a chart that represents data over a
In SSRS, I have a chart that displays data in columns by month. I
I have chart.png with data in it that I would like to put a
I have an ASP Chart (v4) which displays the data I need perfectly. I
I have a Highchart chart to display some data series with animation. The chart
I have a chat program that displays I list of online users. The message
I have developed a Flash based chat client that displays messages posted by users
I have a ListView that displays a shopping cart. It was working fine until

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.