Announcement

Collapse
No announcement yet.
X
  • Filter
  • Time
Clear All
new posts

    How to flip Y Axis in Line chart?

    Hi,

    Is it possible to flip the Y axis on a Line FacetChart, so that the negative values appear on the top, and 0 appears on the bottom?

    This is my current code:
    Code:
     historyChart.setDataSource(DataSource.get("ChipSTA_ChipSummary"));
      historyChart.setFetchOperationId("fetchHistory");
      Facet dateFacet = new Facet("Name", "Run Name");
       
      historyChart.setFacets(dateFacet, new Facet("CheckType", "Check"));
      historyChart.setValueProperty("WNS");
      historyChart.setChartType(ChartType.LINE);
      historyChart.setTitle("# of Failing Paths");
      historyChart.setStacked(false);
      historyChart.setHeight100();
      historyChart.setLabelCollapseMode(LabelCollapseMode.SAMPLE);
      historyChart.setCanZoom(setZoom);
      if (setZoom) {
      historyChart.setZoomStartPosition(ZoomStartPosition.END);
      }
      historyChart.setLogScale(setLog);
      if (setLog) {
      historyChart.setUseLogGradations(true);
      historyChart.setLogGradations(1,5);
      }

    Click image for larger version

Name:	flipchart.png
Views:	42
Size:	36.6 KB
ID:	245995
    Attached Files

    #2
    There's no built in feature currently to flip the axis like that.

    However, you could flip the values provided to the chart, and use various formatting APIs to add "-" to the front of gradations, data value hovers, etc.

    Comment


      #3
      Thanks for your help! Changing them to positive values and adding "-" in front of the graduations seems to work fine.

      Comment

      Working...
      X