The bar color changes in the diagram.
*Created originally on Bitbucket by [mschieder (Magnus Schieder)](https://bitbucket.org/%7Bd4c43f93-ff82-492f-9735-df6362249388%7D/)*
Hello,
I got a file where openpyxl (v2.6.1) unfortunately changes the bar color in the charts. I couldn't create a charts myself with the same effects.
After reading and writing there are two places where the idx values are wrong.
1)
original/xl/charts/chart1.xml
```
<c:barChart>
<c:barDir val="bar"/>
<c:grouping val="percentStacked"/>
<c:varyColors val="0"/>
<c:ser>
<c:idx val="1"/>
<c:order val="0"/>
<c:tx>
<c:strRef>
```
edited/xl/charts/chart1.xml
```
<barChart>
<barDir val="bar"/>
<grouping val="percentStacked"/>
<varyColors val="0"/>
<ser>
<idx val="0"/>
<order val="0"/>
<tx>
<strRef>
```
2)
original/xl/charts/chart1.xml
```
</c:ser>
<c:ser>
<c:idx val="2"/>
<c:order val="1"/>
<c:tx>
<c:strRef>
```
edited/xl/charts/chart1.xml
```
</ser>
<ser>
<idx val="1"/>
<order val="1"/>
<tx>
<strRef>
```
original:

edited:

*Attachments:* [original.xlsx](/uploads/2d04ddc1a89ef177a93768088fe35143/original.xlsx)[original2.xlsx](/uploads/34a436731f382d848673ceb1adce1000/original2.xlsx)
issue