Closed navykoo closed 1 year ago
@navykoo Thanks for your request. Could you support some sketches, screenshots of the plots you'd like to have? SWTChart is an open source project. I could also show you how to setup the IDE to make improvements on the library. Help is always appreciated.
@eselmeister Hi, I am navykoo's colleague. I'm looking for such feature support as well. Here are some websits about BoxPlot. 1,https://en.wikipedia.org/wiki/Box_plot 2,https://echarts.apache.org/examples/en/editor.html?c=boxplot-light-velocity Any suggestion will be appreciated.
@jackybian Great, I could guide you how to setup SWTChart and how to implement the Box plot support.
Just let me know, if and when I shall give you assistance.
@jackybian Great, I could guide you how to setup SWTChart and how to implement the Box plot support.
Thank you very much. I'm a J2EE developer and I am not familiar with Swtchart and RCP.But i can try. Can you tell me how to do. My eclipse version is Eclipse IDE for RCP and RAP Developers - 2022-06.
@jackybian Here's a short description how to setup the system: https://github.com/eclipse/swtchart/blob/develop/org.eclipse.swtchart.cbi/Build.txt
The simplest way to have a look if everything runs fine is to start the following chart as Java application: https://github.com/eclipse/swtchart/blob/develop/org.eclipse.swtchart.extensions.examples/src/org/eclipse/swtchart/extensions/examples/charts/DemoChart.java
Thank you. Due to unfamiliarity with Eclipse and RCPTT, I can't run the demo. Can you tell how to run it with RCPTT
You don't need RCPTT. You can run it directly from within the Eclipse IDE, when you select "Run as Java application...".
On 07.11.22 15:26, jackybian wrote:
Thank you. Due to unfamiliarity with Eclipse and RCPTT, I can't run the demo. Can you tell how to run it with RCPTT
— Reply to this email directly, view it on GitHub https://github.com/eclipse/swtchart/issues/303#issuecomment-1305694840, or unsubscribe https://github.com/notifications/unsubscribe-auth/AAFHUT7ZQQHL4XNHN5FUSRLWHEGP5ANCNFSM6AAAAAAQXOIEX4. You are receiving this because you were mentioned.Message ID: @.***>
--
OpenChrom - the open source alternative for chromatography / mass spectrometry
Dr. Philip Wenig » Founder ***@***.*** »http://www.openchrom.net
Thank you. I followed your steps and encountered a problem. As shown in the screenshot, I can't set Build Path and don't know the reason.
You don't need to set the build path. Open the following target platform in the editor and "Set as Active Target Platform": org.eclipse.swtchart.targetplatform/org.eclipse.swtchart.targetplatform.target
On 08.11.22 03:04, jackybian wrote:
Thank you. I followed your steps and encountered a problem. As shown in the screenshot, I can't set Build Path and don't know the reason. pic https://user-images.githubusercontent.com/11855467/200456512-994500de-8b68-4158-8111-943f976ad9c8.jpg
— Reply to this email directly, view it on GitHub https://github.com/eclipse/swtchart/issues/303#issuecomment-1306510214, or unsubscribe https://github.com/notifications/unsubscribe-auth/AAFHUT6UYNVWSTVDHUWVY5LWHGYKFANCNFSM6AAAAAAQXOIEX4. You are receiving this because you were mentioned.Message ID: @.***>
--
OpenChrom - the open source alternative for chromatography / mass spectrometry
Dr. Philip Wenig » Founder ***@***.*** »http://www.openchrom.net
Thank you. I run the demo in another project which imports swtchar jars. But i did not know how to run the demo in Swtchar Project. I've already set target platform as Active Target Platform. Can you tell me how to prepare to implement the Box plot. I need some preparation.
Are you able to run the demo chart from within your IDE?
On 08.11.22 07:10, jackybian wrote:
Thank you. I run the demo in another project which imports swtchar jars. But i did not know how to run the demo in Swtchar Project. I've already set target platform as Active Target Platform. Can you tell me how to prepare to implement the Box plot. I need some preparation.
— Reply to this email directly, view it on GitHub https://github.com/eclipse/swtchart/issues/303#issuecomment-1306684622, or unsubscribe https://github.com/notifications/unsubscribe-auth/AAFHUTZHRAHQKYSNX5LB6ODWHHVGJANCNFSM6AAAAAAQXOIEX4. You are receiving this because you were mentioned.Message ID: @.***>
--
OpenChrom - the open source alternative for chromatography / mass spectrometry
Dr. Philip Wenig » Founder ***@***.*** »http://www.openchrom.net
I build a new project and import 2 swtchart jars.
@jackybian Please first setup the IDE as mentioned in the build instruction. You need "Eclipse IDE for RCP and RAP Developers" and then run the demo chart as a Java application.
Thank you for your picture. I finished. I took Eclipse as an Idea IDE and selected wrong root directory.
@eselmeister Can you give me some suggestions about implementing Box Plot feature
@jackybian Sure, do you have representative data (x,y) at hand, which we could use to implement the box plot support?
data X {trace0, trace1} data Y {{741.5,752.1,741.4,729.1,767.1,766.1,756.3,745.4,735.6,741,754.2,758.6,753.9,742.6,729.6,723.3,724.6,748.5,754.2,749.2,734,727.6,718.1,729.2,766.5,772.5,765.5,766.5,772.5,765.5 },{743.6,753.9,745.1,731.6,768.2,767.3,758.7,746.6,737.9,743.6,756.6,760.3,755.2,743.6,731.9,725.5,727.4,751.8,756.2,752.8,737.8,731.2,724.9,732.4,770.7,775.7,767.3,745.4, 738.4,736}} I hope the points can show in the box and they can hide.
@jackybian Great, thanks. Give me 2 days to think about it. I'll then guide you how to best implement it.
Thank you and wait for your good news.
@jackybian IMHO, we can implement it by extending the ScatterChart:
org.eclipse.swtchart.extensions.scattercharts.ScatterChart
The functionality of the scatter chart is used and additionally, a IBaseChartPaintListener
is added to draw the boxes based on the live calculated statistics. Let me prepare it for your later today.
@eselmeister Thank you. I've had a lot of high-priority work to do in the last few days. After the work is done, I will try to implement it.
@jackybian Yep, no hurry. I have create a demo chart, which easily can be executed as a Java application:
org.eclipse.swtchart.extensions.examples.charts.DemoBoxPlotChart
The magic needs to implemented here:
org.eclipse.swtchart.extensions.marker.BoxPlotMarker
Additionally have a look at here: https://github.com/eclipse/swtchart/wiki/Documentation#error-bar https://en.wikipedia.org/wiki/Box_plot
I pull the source code and run the DemoBoxPlotChart. The console show the message as shown in the picture.
Could you please have a look at your workspace and check that the file BoxPlotSeries1
is available.
https://github.com/eclipse/swtchart/commit/209d9925089f440d3be965060cedfab431299f56#diff-9d1fad6b59d9ad8317eb3ac603d3d9a20465abf92550afec302714c3452b2281
I can see the scatter, but the FileNotFoundException is still there
You can ignore the FileNotFoundException
. It's from the preference store, which is used by the legend.
Have a look at the BoxPlotMarker
to implement drawing the statistical values:
https://github.com/eclipse/swtchart/blob/develop/org.eclipse.swtchart.extensions/src/org/eclipse/swtchart/extensions/marker/BoxPlotMarker.java
@eselmeister I didn't use the error bar. The pic doesn't looks good. Can I modify X axis from number to string.
@jackybian Your custom paint listener boxes look good. I assume you'd like to have something similar like displayed in category, am I right?
https://github.com/eclipse/swtchart/wiki/Documentation#category
IPrimaryAxisSettings primaryAxisSettingsX = chartSettings.getPrimaryAxisSettingsX();
primaryAxisSettingsX.setVisible(true);
primaryAxisSettingsX.setGridLineStyle(LineStyle.NONE);
Axis xAxis = (Axis)baseChart.getAxisSet().getXAxis(BaseChart.ID_PRIMARY_X_AXIS);
xAxis.enableCategory(true);
xAxis.setCategorySeries(new String[]{"Trace1", "Trace2"});
The boxes are not right. I don't know why.
It's moving into the right direction. There seems to be something going wrong when plotting the blue and red data points. I would recommend to debug the plotting of the data series.
The data series didn't change when I debugged. In addition to this , I hope I can zoom in one box(Trace2) and the X-Axis can only show Trace2
If you're getting any further, please create a pull request, so that I can review your code. Have you signed the Eclipse Contributors Agreement already?
https://github.com/eclipse/swtchart/blob/develop/CONTRIBUTING.md
Ok, The quartile function is not accurate. If the category can show accurately, I will restructure the code and try to push the code to SWTChart Project. BoxPlotMarker.zip
Axis xAxis = (Axis)baseChart.getAxisSet().getXAxis(BaseChart.ID_PRIMARY_X_AXIS); xAxis.enableCategory(true); xAxis.setCategorySeries(new String[]{"Trace 1", "Trace 2"}); Also, I want to study your code. Is there any documentation about code?
I would recommend to use the IPrimaryAxisSettings
to modify the category etc.. When running applySettings(...)
, the settings are transferred to the SWTChart base chart.
We have a documentation here: https://github.com/eclipse/swtchart/wiki/Documentation
Otherwise, I'll guide you.
I use the IPrimaryAxisSettings to modify the category when running applySettings. But It does not work.
OK, let me inspect it. Can you create a PR?
PR? PropertiesResources?
Pull Request :-)
I've already signed ECA. Now I can't create a PR and the GitHub UI shows that I don't have write access to Eclipse/Swtchart.
Yep, it's only allowed for committers to write into the repository. Hence, we use PRs to merge/review request from externals. Have a look at the GitHub documentation on how to create a PR:
It seems to be in your fork. I can't see any PRs here: https://github.com/eclipse/swtchart/pulls
Is that right?
Thanks for the PR. I tracked down the problem. The category series are currently displayed well with bar charts: https://github.com/eclipse/swtchart/wiki/Documentation#category
With scatter data, it doesn't plot the data correctly. Let me find a solution for that problem.
@eselmeister Hi, when can it plot the data correctly?
I am waiting for good news:)
@jackybian Me too. I have a tight schedule, but let me inspect it as soon as possible.
@yoshitaka1008 Excellent, thanks a lot. I have merged it.
Hey, I wanted to check if there is any plan of swtchart to support box plot (or called as box and wirsk plot)? If no, can I do some customization development on swtchart for achieve the goal? Any advice will be appreciated.