eclipse / swtchart

Eclipse Public License 2.0
43 stars 41 forks source link

Box Plot Demo #306

Closed jackybian closed 1 year ago

jackybian commented 1 year ago

The quartile function is not accurate.

eselmeister commented 1 year ago

@jackybian I would recommend to address some issues in the code. I have just fixed the public API issue. https://github.com/eclipse/swtchart/issues/307

Please rebase and address the marked issues. I would recommend to merge this version first and create another issue for the category problem.

Description Resource    Path    Location    Type
Discouraged access: The method 'Axis.getPixelCoordinate(double, double, double)' is not API (restriction on required project 'org.eclipse.swtchart')    BoxPlotMarker.java  /org.eclipse.swtchart.extensions/src/org/eclipse/swtchart/extensions/marker line 67 Java Problem
Discouraged access: The method 'Axis.getPixelCoordinate(double, double, double)' is not API (restriction on required project 'org.eclipse.swtchart')    BoxPlotMarker.java  /org.eclipse.swtchart.extensions/src/org/eclipse/swtchart/extensions/marker line 68 Java Problem
Discouraged access: The method 'Axis.getPixelCoordinate(double, double, double)' is not API (restriction on required project 'org.eclipse.swtchart')    BoxPlotMarker.java  /org.eclipse.swtchart.extensions/src/org/eclipse/swtchart/extensions/marker line 93 Java Problem
Discouraged access: The method 'Axis.getPixelCoordinate(double, double, double)' is not API (restriction on required project 'org.eclipse.swtchart')    BoxPlotMarker.java  /org.eclipse.swtchart.extensions/src/org/eclipse/swtchart/extensions/marker line 94 Java Problem
Discouraged access: The method 'Axis.getPixelCoordinate(double, double, double)' is not API (restriction on required project 'org.eclipse.swtchart')    BoxPlotMarker.java  /org.eclipse.swtchart.extensions/src/org/eclipse/swtchart/extensions/marker line 95 Java Problem
Discouraged access: The method 'Axis.getRange()' is not API (restriction on required project 'org.eclipse.swtchart')    BoxPlotMarker.java  /org.eclipse.swtchart.extensions/src/org/eclipse/swtchart/extensions/marker line 54 Java Problem
Discouraged access: The method 'Axis.getRange()' is not API (restriction on required project 'org.eclipse.swtchart')    BoxPlotMarker.java  /org.eclipse.swtchart.extensions/src/org/eclipse/swtchart/extensions/marker line 55 Java Problem
Discouraged access: The method 'Axis.getRange()' is not API (restriction on required project 'org.eclipse.swtchart')    BoxPlotMarker.java  /org.eclipse.swtchart.extensions/src/org/eclipse/swtchart/extensions/marker line 56 Java Problem
Discouraged access: The method 'Axis.getRange()' is not API (restriction on required project 'org.eclipse.swtchart')    BoxPlotMarker.java  /org.eclipse.swtchart.extensions/src/org/eclipse/swtchart/extensions/marker line 57 Java Problem
Discouraged access: The type 'Axis' is not API (restriction on required project 'org.eclipse.swtchart') BoxPlotMarker.java  /org.eclipse.swtchart.extensions/src/org/eclipse/swtchart/extensions/marker line 31 Java Problem
Discouraged access: The type 'Axis' is not API (restriction on required project 'org.eclipse.swtchart') BoxPlotMarker.java  /org.eclipse.swtchart.extensions/src/org/eclipse/swtchart/extensions/marker line 52 Java Problem
Discouraged access: The type 'Axis' is not API (restriction on required project 'org.eclipse.swtchart') BoxPlotMarker.java  /org.eclipse.swtchart.extensions/src/org/eclipse/swtchart/extensions/marker line 52 Java Problem
Discouraged access: The type 'Axis' is not API (restriction on required project 'org.eclipse.swtchart') BoxPlotMarker.java  /org.eclipse.swtchart.extensions/src/org/eclipse/swtchart/extensions/marker line 53 Java Problem
Discouraged access: The type 'Axis' is not API (restriction on required project 'org.eclipse.swtchart') BoxPlotMarker.java  /org.eclipse.swtchart.extensions/src/org/eclipse/swtchart/extensions/marker line 53 Java Problem
Discouraged access: The type 'Axis' is not API (restriction on required project 'org.eclipse.swtchart') DemoBoxPlotChart.java   /org.eclipse.swtchart.extensions.examples/src/org/eclipse/swtchart/extensions/examples/charts   line 36 Java Problem
The field BigDecimal.ROUND_DOWN is deprecated since version 9   BoxPlotMarker.java  /org.eclipse.swtchart.extensions/src/org/eclipse/swtchart/extensions/marker line 118    Java Problem
The import java.lang.reflect.Array is never used    BoxPlotMarker.java  /org.eclipse.swtchart.extensions/src/org/eclipse/swtchart/extensions/marker line 15 Java Problem
The import java.util.Iterator is never used BoxPlotMarker.java  /org.eclipse.swtchart.extensions/src/org/eclipse/swtchart/extensions/marker line 18 Java Problem
The import org.eclipse.jface.viewers.DecoratingStyledCellLabelProvider is never used    BoxPlotMarker.java  /org.eclipse.swtchart.extensions/src/org/eclipse/swtchart/extensions/marker line 20 Java Problem
The import org.eclipse.swt.graphics.Color is never used BoxPlotMarker.java  /org.eclipse.swtchart.extensions/src/org/eclipse/swtchart/extensions/marker line 22 Java Problem
The import org.eclipse.swt.graphics.GC is never used    BoxPlotMarker.java  /org.eclipse.swtchart.extensions/src/org/eclipse/swtchart/extensions/marker line 32 Java Problem
The import org.eclipse.swtchart.extensions.core.BaseChart is never used BoxPlotMarker.java  /org.eclipse.swtchart.extensions/src/org/eclipse/swtchart/extensions/marker line 37 Java Problem
The import org.eclipse.swtchart.extensions.core.BaseChart is never used DemoBoxPlotChart.java   /org.eclipse.swtchart.extensions.examples/src/org/eclipse/swtchart/extensions/examples/charts   line 25 Java Problem
The import org.eclipse.swtchart.extensions.core.IChartSettings is never used    BoxPlotMarker.java  /org.eclipse.swtchart.extensions/src/org/eclipse/swtchart/extensions/marker line 30 Java Problem
The import org.eclipse.swtchart.IErrorBar.ErrorBarType is never used    BoxPlotMarker.java  /org.eclipse.swtchart.extensions/src/org/eclipse/swtchart/extensions/marker line 34 Java Problem
The import org.eclipse.swtchart.IErrorBar is never used BoxPlotMarker.java  /org.eclipse.swtchart.extensions/src/org/eclipse/swtchart/extensions/marker line 26 Java Problem
The import org.eclipse.swtchart.IErrorBar is never used BoxPlotMarker.java  /org.eclipse.swtchart.extensions/src/org/eclipse/swtchart/extensions/marker line 33 Java Problem
The import org.eclipse.swtchart.internal.axis.Axis is never used    DemoBoxPlotChart.java   /org.eclipse.swtchart.extensions.examples/src/org/eclipse/swtchart/extensions/examples/charts   line 36 Java Problem
The import org.eclipse.swtchart.ISeries is never used   BoxPlotMarker.java  /org.eclipse.swtchart.extensions/src/org/eclipse/swtchart/extensions/marker line 35 Java Problem
The import org.eclipse.swtchart.ISeriesSet is never used    BoxPlotMarker.java  /org.eclipse.swtchart.extensions/src/org/eclipse/swtchart/extensions/marker line 36 Java Problem
The method setScale(int, int) from the type BigDecimal is deprecated since version 9    BoxPlotMarker.java  /org.eclipse.swtchart.extensions/src/org/eclipse/swtchart/extensions/marker line 118    Java Problem
jackybian commented 1 year ago

Thank you very much for your advice 👍

eselmeister commented 1 year ago

@jackybian Good progress ... please address the remaining warnings:

Description Resource    Path    Location    Type
Discouraged access: The type 'Axis' is not API (restriction on required project 'org.eclipse.swtchart') DemoBoxPlotChart.java   /org.eclipse.swtchart.extensions.examples/src/org/eclipse/swtchart/extensions/examples/charts   line 36 Java Problem
The field BigDecimal.ROUND_DOWN is deprecated since version 9   BoxPlotMarker.java  /org.eclipse.swtchart.extensions/src/org/eclipse/swtchart/extensions/marker line 109    Java Problem
The import org.eclipse.swtchart.extensions.core.BaseChart is never used DemoBoxPlotChart.java   /org.eclipse.swtchart.extensions.examples/src/org/eclipse/swtchart/extensions/examples/charts   line 25 Java Problem
The import org.eclipse.swtchart.internal.axis.Axis is never used    DemoBoxPlotChart.java   /org.eclipse.swtchart.extensions.examples/src/org/eclipse/swtchart/extensions/examples/charts   line 36 Java Problem
The method setScale(int, int) from the type BigDecimal is deprecated since version 9    BoxPlotMarker.java  /org.eclipse.swtchart.extensions/src/org/eclipse/swtchart/extensions/marker line 109    Java Problem

Unused imports shall be removed, it resolves 3 warnings:

Description Resource    Path    Location    Type
Discouraged access: The type 'Axis' is not API (restriction on required project 'org.eclipse.swtchart') DemoBoxPlotChart.java   /org.eclipse.swtchart.extensions.examples/src/org/eclipse/swtchart/extensions/examples/charts   line 36 Java Problem
The import org.eclipse.swtchart.extensions.core.BaseChart is never used DemoBoxPlotChart.java   /org.eclipse.swtchart.extensions.examples/src/org/eclipse/swtchart/extensions/examples/charts   line 25 Java Problem
The import org.eclipse.swtchart.internal.axis.Axis is never used    DemoBoxPlotChart.java   /org.eclipse.swtchart.extensions.examples/src/org/eclipse/swtchart/extensions/examples/charts   line 36 Java Problem

The set scale method is deprecated. Just use plain double. It resolves the other 2 warnings:

Description Resource    Path    Location    Type
The field BigDecimal.ROUND_DOWN is deprecated since version 9   BoxPlotMarker.java  /org.eclipse.swtchart.extensions/src/org/eclipse/swtchart/extensions/marker line 109    Java Problem
The method setScale(int, int) from the type BigDecimal is deprecated since version 9    BoxPlotMarker.java  /org.eclipse.swtchart.extensions/src/org/eclipse/swtchart/extensions/marker line 109    Java Problem
jackybian commented 1 year ago

Is that ok?

eselmeister commented 1 year ago

Looks good. There is still one unused import. I'll fix it after merging.

eselmeister commented 1 year ago

@jackybian Well done. This is your first resolved Eclipse SWTChart issue.