score:1
Accepted answer
the stack option doesn't refer to the category index as you expect in your example.
you use stack: 'a' and stack: b' and have one y value for each series. it means that two stacked columns are grouped for one category.
take a look at the api reference and its demo: https://api.highcharts.com/highcharts/series.column.stack
to achieve a stacked column for each category you need to parse mes to the number (timestamp) and pass it as an x
value.
var series = [];
for (var i = 0; i < data.length; i++) {
mes = new date(data[i][0]).gettime() + 60 * 60 * 1000,
total = data[i][1];
categoria = data[i][2];
series.push({
name: categoria,
data: [{x: mes, y: total}],
datalabels: {
enabled: true,
}
});
}
then set your xaxis.type
to datetime
and change label format.
xaxis: {
type: 'datetime',
labels: {
format: '{value:%y-%m}'
},
},
example demo: https://jsfiddle.net/blacklabel/vuldezxw/
Source: stackoverflow.com
Related Query
- Loop in xAxis from highcharts according to returned data
- HighCharts - data from different intervals in one xAxis (hide second xAxis)
- Pass array from js for loop to highcharts series data
- Passing Returned Data from a PHP Script into a Highcharts data[] block?
- How to include data from point in Highcharts xAxis label?
- Highcharts displays series names but missing data points from json source
- Proper way to remove all series data from a highcharts chart?
- Python: Read data from Highcharts after setExtreme
- Scraping data from Highcharts using selenium
- Send JSON data to highcharts pie from asp.net MVC controller in C#
- Converting svg from Highcharts data into data points
- Add dynamic data to line chart from mysql database with highcharts
- How to set second yAxis scale according to data from first yAxis
- How can i change highcharts data values by selecting from a dropdown list
- Using PhantomJS to create HighCharts grahps server side for use in PDF creation (PHP) - results in exit code 11 from PHPs exec();
- Highcharts - Global configuration with common code and unique data & Headings
- HighCharts Time-based Quarterly Data - xAxis Label Issue
- How to populate a Highcharts axis with string formatted data from a PHP array
- Format Highcharts xAxis for stock data
- load data in highcharts from 2 different csv files
- Highcharts bargraph from json data in angularJS
- Passing data from db into Highcharts in Rails 3.x
- Highcharts - set yAxis.max to max value from data
- Loading data from API into a highcharts vue component
- passing data from database to highcharts in Django
- Highcharts xAxis shows labels from drilldown on drillup
- Formatting JSON from a Pandas data frame for Highcharts within a Django template
- Highcharts get data from database
- How to make Highcharts fetch data from external JSON file?
- Passing data to highcharts from javascript array or variable
More Query from same tag
- Highcharts, use error bar with Data Module
- I hope to display empty day to 0 in highcharts
- How to make hover effect for two bar in highcharts at the same time is there any way by using css or any inbuilt method to achieve this?
- How to get continuous graphs in Highstock (beta release)
- DotNet.Highcharts not working with Visual Studio 2010
- Highmaps - Issue with Internet Explorer
- How to create such a `No Data` greyed out design pattern on Highcharts?
- Date.parse() not working with highchart
- highcharts column labels
- How to add different color border in column highchart
- ReactDOM.render into a <div> does not immediately produce HTML
- Highcharts loading data from a HTML table with a title
- Get Highchart Styled Mode via npm
- Highchart drillup issue
- Highcharts mousewheel scroll event in firefox
- Angular 7 Highchart Node.marker not working on page load
- highchart select an area to show some info by clicking and drag mouse but not release
- Apply different colors to different words according to their weight using Highcharts API
- Highcharts and phantomjs error. Can't find variable Highcharts
- Uncaught TypeError adding chart in markdown using Jekyll
- omit top border of highcharts chart
- Highcharts small columns inside area
- Highcharts :: Need to split y-axis from primary body of chart. Can I display this axis separately from the Highchart?
- Hide names in Highcharts Venn Diagram
- Stacked y-Axis on Highcharts, how to make it one?
- HighCharts JSONArray without quotes
- how to add dynamic xaxis category label name in new point highchart
- add formatter for X-axis in Highchart
- Highcharts: how to maintain the same order of category labels when bar chart changes to column chart
- Remove over all line in plot