Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

org.jfree.chart.ChartUtilities renamed to org.jfree.chart.ChartUtils without deprecated paper-trail #66

Open
ronreynolds2 opened this issue Nov 6, 2017 · 25 comments

Comments

@ronreynolds2
Copy link

more of a comment; tho also the javadocs don't mention this move (in fact Google has yet to hear of org.jfree.chart.ChartUtils; it was only by cracking open the 1.5.0 jar that we were able to find where ChartUtilities went).

@mayuso
Copy link

mayuso commented Nov 6, 2017

Please correct me if I am wrong but I believe the same happened with org.jfree.chart.util.ParamChecks. It's named org.jfree.chart.util.Args now.

The change you mention can be found in this commit: 0763be8ec6b44c7fd782fd497aadcd455f0491f0

The change I mention can be found in this one: 22701c9ec4cd5bd88f8a7f17ae11c18099dd1ec7

@tomas-pluskal
Copy link
Contributor

Also many getBase/setBase methods were renamed to getDefault/setDefault (e.g., XYLineAndShapeRenderer.setBaseLinesVisible() -> XYLineAndShapeRenderer.setDefaultLinesVisible(). I had to correct about 200 compilation errors in my project after upgrading JFreeChart from 1.0.19 to 1.5.0. That's life, I guess. But wasn't the https://github.com/jfree/jfreechart-fse project started for that purpose (updating the API)?

@jfree
Copy link
Owner

jfree commented Nov 6, 2017

Please list all the changes you spot, I'll add migration notes to the README. And I'll get the latest API docs uploaded and update the website.

@krheinwald
Copy link

krheinwald commented Nov 16, 2017

This is what noted when ported my application from jfreechart 1.10.19:

  • org.jfree.ui became org.jfree.chart.ui

And

  • (Stacked)BarRenderer3D
  • Axis3D
  • setToolTipGenerator()
  • org.jfree.ui.about

disapperead? These changes impact my exisitng functionality.

@Petikoch
Copy link

Petikoch commented Nov 16, 2017

org.jfree.ui.RefineryUtilities -> org.jfree.chart.ui.UIUtils

@Petikoch
Copy link

import org.jfree.ui. ... -> import org.jfree.chart.ui. ...

@Petikoch
Copy link

Petikoch commented Nov 16, 2017

But most important: The 1.5.0 charts looks as good as the 1.0.19 charts -> everything is working fine after the manual code migration :-) Thank you @jfree for this library!

@krheinwald
Copy link

@Petikoch - Did you use any of 3D Bar Charts, Custom Tooltips, Context Menus? It seems they went AWOL?

@Petikoch
Copy link

@krheinwald I don’t know, I’m using only 2D stuff

@krheinwald
Copy link

Thanks! Any experience with the other sstuff -Tooltips, Context Menus?

@jfree
Copy link
Owner

jfree commented Nov 18, 2017 via email

@bourgesl
Copy link

I successfully migrated to JFreeChart 1.5, only lots of (painful but) trivial class name changes / fix imports.

One question:
I just figured out the (default) legend has no more a visible border, is it wanted ?
You can see it in jfreechart demos v1.0.19 but no more in v1.5

Will see if there are new legend properties...

@twistedtwin
Copy link

DatasetUtilities moved to DatasetUtils

@twistedtwin
Copy link

ShapeUtilities renamed to ShapeUtils
TextUtilities renamed to TextUtils

isPointInRect moved from AbstractXYItemRenderer to ShapeUtils

@pos9101
Copy link

pos9101 commented Mar 22, 2022

I had used custom calculateDomainMarkerTextAnchorPoint() in CombinedDomainXYPlot.
I change method from RectangleAnchor.coordinates(Rectangle2D anchorRect. RectangleAnchor anchor) to anchor.getAnchorPoint(RectangleAnchor anchorRect).

Method RectangleAnchor.coordinates() disappeared.

@trashgod
Copy link
Contributor

trashgod commented Mar 22, 2022

I see that change here in the v1.5.3 branch. The changes may guide your revised approach.

@AlexyNau
Copy link

When migrating from JFreeChart 1.0.17 to 1.5.4, I changed :

setStroke(Stroke) -> setDefaultStroke(Stroke)
setBaseShapesVisible(boolean) -> setDefaultShapesVisible(boolean)

And

rendererBlue.setDefaultStroke(new BasicStroke(3.0f));

became

 renderer.setDefaultStroke(new BasicStroke(3.0f));
 ((AbstractRenderer) renderer).setAutoPopulateSeriesStroke(false);

(See jfree.org/forum for the last change justification)

@trashgod
Copy link
Contributor

See also Migration.

@ffedeli
Copy link

ffedeli commented Apr 23, 2024

Right clicking a chart and selecting "save as ... png" I got this error msg : "java.lang.NoClassDefFoundError: org/jfree/chart/ChartUtilities". (Jfreechart vers. 1.5.4, maven dependency)

@trashgod
Copy link
Contributor

Right clicking a chart and selecting "save as ... png" I got this error msg : "java.lang.NoClassDefFoundError: org/jfree/chart/ChartUtilities". (Jfreechart vers. 1.5.4, maven dependency)

I can't reproduce this using jfreechart-1.5.4 from here, which uses org.jfree.chart.ChartUtils. Any chance you have an older version in the classpath?

@ffedeli
Copy link

ffedeli commented Apr 24, 2024

Probably this issue comes from this MAVEN dependency I used:

org.jfree jfreechart 1.5.4

In fact, replacing this dependency with your jfreechart-1.5.4.jar file directly in my java build path all runs OK.

Note: I compared with Windows FC command your jfreechart-1.5.4.jar file with my maven downloaded file and they seem identical, so I don't understand why the second solution works fine

Thank you for your support

@ffedeli
Copy link

ffedeli commented Apr 24, 2024

Sorry, this is MAVEN dependency link https://mvnrepository.com/artifact/org.jfree/jfreechart

@trashgod
Copy link
Contributor

trashgod commented Apr 24, 2024

Yes, the files have identical checksums. Did any older version(s) turn up on the classpath? You might search for errant JARs in the directories found in the system property java.library.path or your IDE's project library.

@ffedeli
Copy link

ffedeli commented Apr 25, 2024

Found, it's my fault. My Java application is designed in the SWT framework, so I thought I should use both MAVEN dependencies for jfreechart-1.5.4.jar and jfreechart-swt-1.0.jar. It was a big mistake, only the latter is necessary!!
In fact, jfreechart-swt-1.0.jar has embedded jfreechart-1.0.19.jar (and other jars...) as you can see in the attached file
By doing so everything really works well!!
Your last comment, trashgod, put me on the right track, thanks

@ffedeli
Copy link

ffedeli commented Apr 25, 2024

sorry, this is the file
Screenshot 2024-04-25 170308

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests