title: Can I create a bar (column) chart in Openpyxl from "horizontal" data?
body: <p>I have been using <a href="https://media.readthedocs.org/pdf/openpyxl/stable/openpyxl.pdf" rel="nofollow">this guide</a> as my chief resource for creating charts using openpyxl.  All of the examples there appear to be of the form:</p>
  
  <p>HEADER1 HEADER 2 HEADER 3<br/>
  X1      Y11      Y12<br/>
  X2      Y12      Y22<br/>
  .....</p>
  
  <p>So the categories would be the first column and the data series would be the other columns.  What I am wondering about is can we work with data like this?</p>
  
  <p>X1 X2 X3 ...<br/>
  Y11 Y12 Y13<br/>
  Y21 Y22 Y23<br/></p>
  
  <p>It would appear that no matter what I set as may categories (in the following code) that openpyxl tries to tell me that my data is laid out in the first manner.  Note that this code is called 5 times and a typical col/row set of values for a chart is:</p>
  
  <p>min_row = 3
  max_row = 3
  min_col = 6
  max_col = 27</p>
  
  <pre><code>    if draw_charts == True:
          chart = BarChart()
          chart.type = "col"
          chart.style = 10
          chart.title = "Channel " + str(channel_name) + " Stdevs " + str(stdevs)
          chart.x_axis.title = 'Time Diff (s)'
          chart.y_axis.title = 'Counts'
  
          values = Reference(ws2, min_col = 6, min_row = 3 + index * 2, max_col = 5 + bins, max_row=3 + index * 2)
          categories = Reference(ws2, min_col=6, min_row = 2 + index * 2, max_col = 5 + bins, max_row=2 + index * 2)
          chart.add_data(values, titles_from_data=True)
          chart.set_categories(categories)
          ws2.add_chart(chart, num2col(col2num('A') + index * 6) + '22')
  </code></pre>