score:1

Accepted answer

You're setting 5 different data series (Subject 1-5) so it is reserving space at each value of 'indicator' (data 1-5) along the x-axis for 5 bars, but you are only setting a value for one series per data point in your data.

           { 'indicator': 'data1', 'Subject1': 100 },
           { 'indicator': 'data2', 'Subject2': 90 },
           { 'indicator': 'data3', 'Subject3': 66 },
           { 'indicator': 'data4', 'Subject4': 50 },
           { 'indicator': 'data5', 'Subject5': 50 },

I suspect Subject should be one series, so try this where there is only one data series Subject, and the bars then fit half the width at each 'indicator' value along the x-axis.

  { 'indicator': 'data1', 'Subject': 100 },
  { 'indicator': 'data2', 'Subject': 90 },
  { 'indicator': 'data3', 'Subject': 66 },
  { 'indicator': 'data4', 'Subject': 50 },
  { 'indicator': 'data5', 'Subject': 50 },


keys: {
   x: 'indicator',
   value: ['Subject']
}

http://jsfiddle.net/68pgvsbh/5/

Your alternative if you do want to keep the different named Subject series for some reason is to add them as a stacked group

  groups: [["Subject1", "Subject2", "Subject3", "Subject4", "Subject5"]],

Related Query

More Query from same tag