wergeld
wergeld

Reputation: 14462

HighCharts BoxPlot With Multiple Series Having Single Data

Using the type: 'boxplot' chart I am trying to set up a view of some wage data. The data consists of multiple occupations and their wage values for low, q1, median, q3, high. My issue is that each occupation just has one set of those 5 points. So, I have 14 occupations in this example with 14 distinct series values (of the 5 wage values). Each series looks like this:

{
     name: 'Computer and Information Research Scientists',
     data: [
          [68834.77, 85124.14, 107734.77, 131196.33, 157504.48]
          ],
     tooltip: {
          headerFormat: '<em>{point.key}</em><br/>'
     }
}

The chart renders the 14 box "points" fine. However the xAxis (which I have inverted but it is the same if not inverted) just shows the first category title and appends that to the tooltip text box and no other category names appear on the xAxis. I thought it was the tooltip code in each series but removing that still has the labeling wrong. My example can be found here. How can I maintain category names?

Upvotes: 0

Views: 2472

Answers (1)

Paweł Fus
Paweł Fus

Reputation: 45079

As I can see, each series has only one point, so doesn't contain x-value, so assumed pointStart is 0, and pointInterval is 1 (for categorized axis).

If you chave only one point per series, I advice to add x-value, which is also category index, take a look: http://jsfiddle.net/LrLLU/2/

Upvotes: 3

Related Questions