V
V
Vitaly Unknown2018-03-04 18:43:38
JavaScript
Vitaly Unknown, 2018-03-04 18:43:38

How to link data to a specific category in Highcharts?

I would be grateful and glad for any help.
The essence of the task / problem:
I have 6 entities that need to be displayed in 4 quarters ( read categories)
Something like this: 5a9c141caafe0151821942.png
And I can’t figure out how to associate data with a specific category in Highcharts.js
For example, using pseudocode :

let data = {
data = {
    Q1: {
        oil: {
            buy: [10, 20, 30],
            sold: [10, 20, 0]
        },
        gas: {
            buy: [150, 20, 30],
            sold: [10, 320, 0]
        },
        dollar: {
            buy: [150, 20, 30],
            sold: [10, 320, 0]
        },
    },
    Q2 : ...
}

And then link it to groups/categories
That's what I got at the moment, but as you can see, in the 1st quarter, all entities are rendered in OIL
And I need to be able to render only 2 bars
https://jsfiddle.net/ 1v2ctome/
/* Not necessarily on Highcharts */
Or maybe someone knows which way to google, what is the name of this chart? Multi-column, or what?)

Answer the question

In order to leave comments, you need to log in

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question