mirror of
https://github.com/eclipse-sailing-analytics/sailing-analytics.git
synced 2026-10-18 02:00:58 +00:00
increased speed of vertical wind chart
This commit is contained in:
1 parent
743e3d8199
commit
1e951ba6cb
2 files changed
+4
-3
No files matched your search
+1
-1
@@ -22,7 +22,7 @@ public class HighchartsUtil {
|
||||
}
|
||||
|
||||
/**
|
||||
* In cases where it is necessary to initialize a {@link Chart}, with dynamic size during the same browser loop, where it´s dynamic container is initialized,
|
||||
* In cases where it is necessary to initialize a {@link Chart} with dynamic size during the same browser loop, where it´s dynamic container is initialized,
|
||||
* the {@link Chart.setSizeToMatchContainer()} method will not work. The solution to that problem is to call {@link Chart#setSizeToMatchContainer()} later,
|
||||
* when the container of the chart is completely initialized and its size is available to the {@link Chart}.
|
||||
* */
|
||||
|
||||
+3
-2
@@ -40,6 +40,7 @@ import com.google.gwt.user.client.ui.Composite;
|
||||
import com.google.gwt.user.client.ui.FocusPanel;
|
||||
import com.google.gwt.user.client.ui.HasWidgets;
|
||||
import com.google.gwt.user.client.ui.Widget;
|
||||
import com.sap.sailing.dashboards.gwt.client.util.HighchartsUtil;
|
||||
|
||||
/**
|
||||
* The class represents a wind chart that is displayed vertically. Because it is meant to be used to display wind fixes,
|
||||
@@ -114,6 +115,7 @@ public class VerticalWindChart extends Composite implements HasWidgets {
|
||||
positiveSeriesColorAsHex = positiveFillColor;
|
||||
negativeSeriesColorAsHex = negativeFillColor;
|
||||
verticalWindChartClickListeners = new ArrayList<VerticalWindChartClickListener>();
|
||||
HighchartsUtil.setSizeToMatchContainerDelayed(verticalWindChart);
|
||||
}
|
||||
|
||||
private void setChartOptions() {
|
||||
@@ -207,7 +209,6 @@ public class VerticalWindChart extends Composite implements HasWidgets {
|
||||
}
|
||||
verticalWindChartSeries.updateThreshold("" + average);
|
||||
adaptVerticalWindChartExtemes();
|
||||
verticalWindChart.setSizeToMatchContainer();
|
||||
}
|
||||
});
|
||||
}
|
||||
@@ -229,7 +230,7 @@ public class VerticalWindChart extends Composite implements HasWidgets {
|
||||
private void setXAxisExtremesForSeriesPointRangeIsBiggerThanChartDisplayIntervall() {
|
||||
long maximumExtremeValueInMillis = getLastPointOfVerticalWindChartSeries().getX().longValue();
|
||||
long minimumExtremeValueInMillis = maximumExtremeValueInMillis - chartIntervallinMinutes * 60 * 1000;
|
||||
verticalWindChart.getXAxis().setExtremes(minimumExtremeValueInMillis, maximumExtremeValueInMillis, true, true);
|
||||
verticalWindChart.getXAxis().setExtremes(minimumExtremeValueInMillis, maximumExtremeValueInMillis, true, false);
|
||||
}
|
||||
|
||||
|
||||
|
||||
Reference in new issue
Block a user