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

  • Home
  • SEARCH
  • 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 8802457
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 14, 20262026-06-14T01:05:41+00:00 2026-06-14T01:05:41+00:00

I am using HighCharts for the data visualization as bar chart for one of

  • 0

I am using HighCharts for the data visualization as bar chart for one of the problems. However, I am facing problems with passing a series data/category as an array. Please help me with this

$.getJSON('TotalUsers.json', function(data) {
var valuesTotal = [];
var daysTotal = [];
$.each(data.day, function(key, obj) {
    valuesTotal.push('<li id="value-' + key + '">' + obj["@value"] + '</li>');
    daysTotal.push('<li id="day-' + key + '">' + obj["@date"] + '</li>');
});
});​

At the end of it, I am getting array which is valuesTotal = [53819,57558,61141];

I would like to pass this array in the category and series data of a stacked bar chart in HighGraphs like this

var chart;
$(document).ready(function() {

    chart = new Highcharts.Chart({
        chart: {
            renderTo: 'container',
            type: 'bar'
        },
        title: {
            text: 'Stacked Bar Chart Representation'
        },
        xAxis: {
            categories: [valuesActive];
        },
        yAxis: {
            min: 0,
            title: {
                text: 'Active User Ratio'
            }
        },
        legend: {
            backgroundColor: '#FFFFFF',
            reversed: true
        },
        tooltip: {
            formatter: function() {
                return ''+
                    this.series.name +': '+ this.y +'';
            }
        },
        plotOptions: {
            series: {
                stacking: 'normal'
            }
        },
            series: [{
            name: 'Total Days',
            data: daysTotal    // m getting an error here
        }, {
            name: 'Total Users',
            data: valuesTotal   // m getting an error here
        }]
    });

Please help me out. Any help will be appreciated.

Thanks.

  • 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-14T01:05:42+00:00Added an answer on June 14, 2026 at 1:05 am

    You can declare an array in javascript like this also:

    var daysTotal = new Array();
    

    Also try to insert values into array like:

    daysTotal[key] = value;
    

    Then pass this array to highchart.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I'm trying to create a chart using highcharts to represent some data. However i'm
I want to add a background image to a bar chart using Highcharts and
I'm working on a Bubble Chart using Highcharts. Here's a sample of my data:
Using highcharts, I am adding multiple series to an exist chart. When adding the
I am using HighCharts Bar graph to plot data from mysql resultset into a
I'm using the HighStock version of HighCharts to create a series of data in
I am using a line chart (Highcharts) for displaying forecast data which is fed
I am using a bar chart below. chart = new Highcharts.Chart({ chart: { renderTo:
I am using highcharts to represent data. In my chart based on conditions some
I'm using Highcharts to represent groups of time series. So, data points collected from

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.