Bug #3498
Charts, CA, "Export\Chart..." command doesn't work when the CA Editor is not opened
Statut: | New | Début: | 10/11/2023 | ||
---|---|---|---|---|---|
Priorité: | Normal | Echéance: | |||
Assigné à: | - | % réalisé: | 50% |
||
Catégorie: | Charts | Temps passé: | - | ||
Version cible: | TXM 0.8.4 |
Description
Stacktrace:
Exportation de VOEUX/text@loc/@frlemma ≥2 ≤61 197 /200/ (1,2)… JFCChartsEngine.exportRasterImage(): writing chart to file C:\Users\s\Desktop\tests exports TXM\frlemma 12.png... java.lang.NullPointerException: Cannot invoke "java.awt.Graphics2D.getFontRenderContext()" because the return value of "org.jfree.chart.ChartPanel.getGraphics()" is null at org.txm.ca.core.chartsengine.jfreechart.themes.highcharts.renderers.CAItemSelectionRenderer.getItemShape(CAItemSelectionRenderer.java:241) at org.jfree.chart.renderer.xy.XYLineAndShapeRenderer.drawSecondaryPass(XYLineAndShapeRenderer.java:943) at org.jfree.chart.renderer.xy.XYLineAndShapeRenderer.drawItem(XYLineAndShapeRenderer.java:726) at org.txm.chartsengine.jfreechart.core.themes.highcharts.defaulttheme.renderers.ItemSelectionXYLineAndShapeRenderer.drawItem(ItemSelectionXYLineAndShapeRenderer.java:354) at org.jfree.chart.plot.XYPlot.render(XYPlot.java:3450) at org.jfree.chart.plot.XYPlot.draw(XYPlot.java:2987) at org.jfree.chart.JFreeChart.draw(JFreeChart.java:1161) at org.jfree.chart.JFreeChart.createBufferedImage(JFreeChart.java:1328) at org.txm.chartsengine.jfreechart.core.JFCChartsEngine.exportRasterImage(JFCChartsEngine.java:645) at org.txm.chartsengine.jfreechart.core.JFCChartsEngine.export(JFCChartsEngine.java:488) at org.txm.chartsengine.jfreechart.core.JFCChartsEngine.exportChartToFile(JFCChartsEngine.java:459) at org.txm.chartsengine.core.ChartsEngine.exportChartToFile(ChartsEngine.java:528) at org.txm.chartsengine.jfreechart.core.JFCChartsEngine.exportResultToFile(JFCChartsEngine.java:444) at org.txm.chartsengine.rcp.handlers.ExportChart$1.run(ExportChart.java:158) at org.eclipse.core.internal.jobs.Worker.run(Worker.java:63)
Historique
#1 Mis à jour par Sebastien Jacquot il y a presque 2 ans
- % réalisé changé de 0 à 50
The error comes from the auto-computing of the size of the label bounding box according to the current Font Context (size, etc.)
Since the ChartPanel is not open, Graphics2D object is null.
The label box has been temporarily removed from the "Export\Chart..." command process.
Before fully fixing the problem, need to see if we keep the "Export\Chart..." command.