Skip to content

Commit

Permalink
Add support for MultiXYErrorBarSeries
Browse files Browse the repository at this point in the history
- Wasn't wired up at all
  • Loading branch information
mofojed committed Nov 2, 2023
1 parent 7fcacad commit 372be80
Show file tree
Hide file tree
Showing 2 changed files with 92 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -107,6 +107,38 @@ public XYErrorBarDataSeriesInternal createSeries(String seriesName, final BaseTa
drawXError, drawYError);
}

public boolean getDrawXError() {
return drawXError;
}

public boolean getDrawYError() {
return drawYError;
}

public String getX() {
return x;
}

public String getXLow() {
return xLow;
}

public String getXHigh() {
return xHigh;
}

public String getY() {
return y;
}

public String getYLow() {
return yLow;
}

public String getYHigh() {
return yHigh;
}

////////////////////////////// CODE BELOW HERE IS GENERATED -- DO NOT EDIT BY HAND //////////////////////////////
////////////////////////////// TO REGENERATE RUN GenerateMultiSeries //////////////////////////////
////////////////////////////// AND THEN RUN GenerateFigureImmutable //////////////////////////////
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -32,6 +32,7 @@
import io.deephaven.plot.datasets.multiseries.AbstractMultiSeries;
import io.deephaven.plot.datasets.multiseries.AbstractPartitionedTableHandleMultiSeries;
import io.deephaven.plot.datasets.multiseries.MultiCatSeries;
import io.deephaven.plot.datasets.multiseries.MultiXYErrorBarSeries;
import io.deephaven.plot.datasets.multiseries.MultiXYSeries;
import io.deephaven.plot.datasets.ohlc.OHLCDataSeriesArray;
import io.deephaven.plot.datasets.xy.AbstractXYDataSeries;
Expand Down Expand Up @@ -518,6 +519,65 @@ private FigureDescriptor.ChartDescriptor translate(ChartImpl chart) {
clientSeries.setPointShape(stringMapWithDefault(mergeShapes(
multiCatSeries.pointShapeSeriesNameToStringMap(),
multiCatSeries.pointShapeSeriesNameToShapeMap())));
} else if (partitionedTableMultiSeries instanceof MultiXYErrorBarSeries) {
MultiXYErrorBarSeries multiXYErrorBarSeries =
(MultiXYErrorBarSeries) partitionedTableMultiSeries;

clientAxes.add(makePartitionedTableSourceDescriptor(
plotHandle, multiXYErrorBarSeries.getX(), SourceType.X, xAxis));
if (multiXYErrorBarSeries.getDrawXError()) {
clientAxes.add(makePartitionedTableSourceDescriptor(
plotHandle, multiXYErrorBarSeries.getXLow(), SourceType.X_LOW, xAxis));
clientAxes.add(makePartitionedTableSourceDescriptor(
plotHandle, multiXYErrorBarSeries.getXHigh(), SourceType.X_HIGH,
xAxis));
}

clientAxes.add(makePartitionedTableSourceDescriptor(
plotHandle, multiXYErrorBarSeries.getY(), SourceType.Y, yAxis));
if (multiXYErrorBarSeries.getDrawYError()) {
clientAxes.add(makePartitionedTableSourceDescriptor(
plotHandle, multiXYErrorBarSeries.getYLow(), SourceType.Y_LOW, yAxis));
clientAxes.add(makePartitionedTableSourceDescriptor(
plotHandle, multiXYErrorBarSeries.getYHigh(), SourceType.Y_HIGH,
yAxis));
}

clientSeries.setLineColor(stringMapWithDefault(mergeColors(
multiXYErrorBarSeries.lineColorSeriesNameTointMap(),
multiXYErrorBarSeries.lineColorSeriesNameToStringMap(),
multiXYErrorBarSeries.lineColorSeriesNameToPaintMap())));
clientSeries.setPointColor(stringMapWithDefault(mergeColors(
multiXYErrorBarSeries.pointColorSeriesNameTointMap(),
multiXYErrorBarSeries.pointColorSeriesNameToStringMap(),
multiXYErrorBarSeries.pointColorSeriesNameToPaintMap())));
clientSeries.setLinesVisible(
boolMapWithDefault(
multiXYErrorBarSeries.linesVisibleSeriesNameToBooleanMap()));
clientSeries.setPointsVisible(
boolMapWithDefault(
multiXYErrorBarSeries.pointsVisibleSeriesNameToBooleanMap()));
clientSeries.setGradientVisible(
boolMapWithDefault(
multiXYErrorBarSeries.gradientVisibleSeriesNameTobooleanMap()));
clientSeries.setPointLabelFormat(stringMapWithDefault(
multiXYErrorBarSeries.pointLabelFormatSeriesNameToStringMap()));
clientSeries.setXToolTipPattern(
stringMapWithDefault(
multiXYErrorBarSeries.xToolTipPatternSeriesNameToStringMap()));
clientSeries.setYToolTipPattern(
stringMapWithDefault(
multiXYErrorBarSeries.yToolTipPatternSeriesNameToStringMap()));
clientSeries.setPointLabel(stringMapWithDefault(
multiXYErrorBarSeries.pointColorSeriesNameToStringMap(),
Objects::toString));
clientSeries.setPointSize(doubleMapWithDefault(
multiXYErrorBarSeries.pointSizeSeriesNameToNumberMap(),
number -> number == null ? null : number.doubleValue()));

clientSeries.setPointShape(stringMapWithDefault(mergeShapes(
multiXYErrorBarSeries.pointShapeSeriesNameToStringMap(),
multiXYErrorBarSeries.pointShapeSeriesNameToShapeMap())));
} else {
errorList.add(
"OpenAPI presently does not support series of type "
Expand Down

0 comments on commit 372be80

Please sign in to comment.