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

keikai renders a combination chart with a scatter and a column differently from Excel

XMLWordPrintable

    • Icon: Bug Bug
    • Resolution: Fixed
    • Icon: Normal Normal
    • 6.1.0
    • 6.0.0
    • None
    • Security Level: Jimmy
    • None

      Steps to Reproduce

      1. load keikai-793.xlsx

      Current Result

      Expected Result

      Debug Information

      • because each chart has its own x axis, so that keikai renders scatter values on a different x axis from column chart. That's why the scatter points' x position doesn't align with column serieses.

      Workaround

      In io.keikaiex.util.HighchartsHelper.java
      
      private static Series getComboSeries(GeneralChartDataImpl chartData, AbstractSeriesAdv sseries, boolean onlyVisible,
                                               String[] categories, boolean containsBar, int num, int xAxisIndex,
                                               int yAxisIndex, HighchartsAxisHelper.AxisRanger ranger) {
      ...
                  case SCATTER: // bar chart and scatter chart can not combine together
                  {
                      final Point[] points = getXySeriesValues(onlyVisible, sseries);
                      series.setData(points);
                      for (int i = 0; i < points.length; ++i) {
                          final Point p = points[i];
                          ranger.scan(valAxId, chartType, p.getX() == null ? i : p.getX(), p.getY(), ChartGrouping.STANDARD);
                      }
                      series.setXAxis(0); //change xAxisIndex to 0
      

        1. keikai.png
          keikai.png
          23 kB
        2. excel.png
          excel.png
          36 kB
        3. keikai-793.xlsx
          18 kB

            rebeccalai rebeccalai
            hawk hawk
            Votes:
            0 Vote for this issue
            Watchers:
            3 Start watching this issue

              Created:
              Updated:
              Resolved: