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 8511225
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 11, 20262026-06-11T03:55:50+00:00 2026-06-11T03:55:50+00:00

Depending the selected chart type (line/column/scatter, etc), is it possible to have multiple option

  • 0

Depending the selected chart type (line/column/scatter, etc), is it possible to have multiple option settings in one single render? For instance I have two chart types:

var options = {
    chart: {
        renderTo: 'container',
        type: 'column',
    },
    title: {
        text: title
    },
    subtitle: {
        text: subtitle
    },
    xAxis: {
        categories: []
    },
    yAxis: {
        min: 0,
        title: {
            text: 'Percentage'
        }
    },
    legend: {
        layout: 'vertical',
        backgroundColor: '#FFFFFF',
        align: 'left',
        verticalAlign: 'top',
        x: 100,
        y: 70,
        floating: true,
        shadow: true
    },
    tooltip: {
        formatter: function () {
            return Math.round(this.y * 100) + '%';
        }
    },
    plotOptions: {
        column: {
            pointPadding: 0.2,
            borderWidth: 0
        }
    },
    series: []
};

And:

var options = {
    chart: {
        renderTo: 'container',
        type: 'line'
    },
    title: {
        text: title
    },
    subtitle: {
        text: subtitle
    },
    xAxis: {
        categories: []
    },
    yAxis: {
        min: 0,
        title: {
            text: 'Count'
        }
    },
    tooltip: {
        formatter: function () {
            var s = '';

            $.each(this.points, function (i, point) {
                s += point.series.name + ': ' + point.y + '<br/>';
            });
            return s;
        },
        shared: true
    }
},
legend: {
    layout: 'vertical',
    align: 'right',
    verticalAlign: 'top',
    x: -10,
    y: 100,
    borderWidth: 0
},
series: []
};

Is it possible to combine them together as in one $(document).on("click", ".render-Chart", function () {...} or var chart? Thank you!

  • 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-11T03:55:51+00:00Added an answer on June 11, 2026 at 3:55 am

    I didn’t really get the question. But if the question is, “Is it possible?” Then why don’t you directly try doing it. If you have tried and it did not turn out as expected, get back here with a jsFiddle tryout and your expected vs actual behaviors.

    If what you are asking is if you have two charting options one for line and another for column, both pointing to the same container, and based on some click or condition you would either want to plot a line or column, but not both then yes very much possible. If you are afraid that you have mentioned the same container id in both the options causing some conflict then, make a note that the options by themselves are just variables that store data/info and don’t modify the DOM or execute themselves, it’s only the Highchart’s constructor that takes these as parameter and plots the chart, so as long as the constructor is called only once, you should be safe using the same container n number of times, or the latest constructor’s chart would be plotted to that container.

    var lineOptions = {
        chart: {
            type: 'line',
            renderTo: 'container',
            //...
        }
        //...
    };
    
    var columnOptions = {
        chart: {
            type: 'column',
            renderTo: 'container',
            //...
        }
        //...
    };
    //...
    var chart;
    function onClick(){
        if(...){
            chart = new Highcharts.StockChart(lineOptions);
        }else if(...){
            chart = new Highcharts.StockChart(columnOptions);
        }       
    }
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I have a form with 2 buttons, that depending on which is selected will
I have a select element with a few options. Depending on what is selected,
I have three Tabs in my Windows Forms form. Depending on the selected RadioButton
i want to write script that changes picture depending on selected option <img id=image-manekin
I want to disable textbox depending on option selected in listbox in rails 3
I have a form, depending on the selected value of my <select> box I
I have a wxLua Gui app that has a Run button. Depending on selected
I have a JList that will point to a selected JList depending on user.
I need to fill textboxes depending on the item selected in a combobox. I
I'm creating a javascript method that populates lists depending on a radio button selected

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.