Uploaded image for project: 'Keikai'
  1. Keikai
  2. KEIKAI-619

reversed order of series color on stacked column charts

XMLWordPrintable

    • Icon: Bug Bug
    • Resolution: Fixed
    • Icon: Normal Normal
    • 5.11.0
    • 5.10.0
    • None
    • Security Level: Jimmy

      Steps to Reproduce

      1. import the file

      Current Result

      the order of the series color is reversed to how it looks in Excel

      the order of the categories for a horizontal stacked graph is reverse that of Excel

      Expected Result


      Debug Information

      Original observations by Hawk

      Caused by chart type, stacked column/bar chart. If you change to another 2D chart type, the colors are expected.

      Further observations regarding color

      // hightcharts will place the series in order
      // here we need to add it in the reversed order
      

      The comment above in CategoryModelSelector.toCharts in ChartsModelManager.java means that if the "series" order is not inverted we will get an upside-down stack:

      Compare the figure above with the correct result of excel:

      However, when we set the colors in drawChartInner (in HighchartsHelper.java) we didn't access the "series" in the correct order to account for our manual inversion in CategoryModelSelector.toCharts. Hence, we have the stacks in correct order but color not so:

      Also note the order of the text and color of the legends for the three diagrams.

        1. excel-color.jpg
          excel-color.jpg
          27 kB
        2. HighchartsHelper.java
          28 kB
        3. highchart-stack-inversion.png
          highchart-stack-inversion.png
          43 kB
        4. horizontal-excel.png
          horizontal-excel.png
          7 kB
        5. horizontal-stacked-color-correct.png
          horizontal-stacked-color-correct.png
          43 kB
        6. horizontal-stacked-color-incorrect.png
          horizontal-stacked-color-incorrect.png
          43 kB
        7. keikai-619.xlsx
          34 kB
        8. keikai-color.jpg
          keikai-color.jpg
          27 kB

            gordonhsu gordonhsu
            hawk hawk
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

              Created:
              Updated:
              Resolved: