Skip to content

Commit

Permalink
Merge pull request #548 from mrcjkb/issue#547
Browse files Browse the repository at this point in the history
#547: Re-add API endpoints required for manual zoom.
  • Loading branch information
timmolter authored Jul 30, 2023
2 parents caaca95 + e176bd4 commit 2a8faf3
Showing 1 changed file with 48 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -241,6 +241,54 @@ Format getYAxisFormat(String yAxisDecimalPattern) {
return format;
}

public double getChartXFromCoordinate(int screenX) {

if (axisPair == null) {
return Double.NaN;
}
return axisPair.getXAxis().getChartValue(screenX);
}

public double getChartYFromCoordinate(int screenY) {

if (axisPair == null) {
return Double.NaN;
}
return axisPair.getYAxis().getChartValue(screenY);
}

public double getChartYFromCoordinate(int screenY, int yIndex) {

if (axisPair == null) {
return Double.NaN;
}
return axisPair.getYAxis(yIndex).getChartValue(screenY);
}

public double getScreenXFromChart(double xValue) {

if (axisPair == null) {
return Double.NaN;
}
return axisPair.getXAxis().getScreenValue(xValue);
}

public double getScreenYFromChart(double yValue) {

if (axisPair == null) {
return Double.NaN;
}
return axisPair.getYAxis().getScreenValue(yValue);
}

public double getScreenYFromChart(double yValue, int yIndex) {

if (axisPair == null) {
return Double.NaN;
}
return axisPair.getYAxis(yIndex).getScreenValue(yValue);
}

// ArrayList<ChartPart> getAnnotations() {
//
// return annotations;
Expand Down

0 comments on commit 2a8faf3

Please sign in to comment.