Jump to content
Software FX Community

Shady

Members
  • Posts

    14
  • Joined

  • Last visited

Everything posted by Shady

  1. Hi, I am having some display issue when rendering a chart in curve mode: The line isn't painted in some cases. It seems the scale of the Y-axis is not well adjusted to draw the inferior part of the line. Here is a simplified example that shows my problem: import java.awt.Dimension; import javax.swing.JFrame; import com.softwarefx.chartfx.desktop.Chart; import com.softwarefx.chartfx.desktop.Gallery; public class Example { public static void main(String[] args) { Chart c = new Chart(); double vals[] = { 0, 0, 0, 0, 0, 134.5, 269, 404 }; c.getData().setPoints(vals.length); for(int i = 0; i < vals.length; i++) { c.getData().set(0, i, vals); } c.getData().setSeries(1); c.setGallery(Gallery.CURVE); JFrame frame = new JFrame(); frame.getContentPane().add©; frame.setSize(new Dimension(800, 600)); frame.setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE); frame.setVisible(true); } } In this example, the line between points 4 and 5 is not drawn on screen since inferior to the minimum (although the y-axis is left to adjust according to values). Is there a way to make sure the curve line is always completely displayed on screen without having to force the minimum (since my values change dynamically)? Thanks for your help, Shady
  2. Hi, I am trying to display a Pyramid chart with last point value set to zero, however no chart is appearing. Anyone knows if I am missing something or if this is a bug? A simplified testcase to reproduce is: public static void main(String[] args) { Chart cc = new Chart(); cc.setGallery(Gallery.PYRAMID); cc.getData().setSeries(1); cc.getData().setPoints(2); cc.getData().set(0, 0, 10); cc.getData().set(0, 1, 0); //If we change this value, the chart is displayed JFrame f = new JFrame(); f.getContentPane().add(cc); f.setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE); f.pack(); f.setVisible(true); } Note that the same chart displayed in Pie for example is visible. Thanks, Shady
  3. Hi,Is there a way or a workaround to display a chart line with only one continuous line per serie even if the serie doesn't have a certain value (one of the points has a NULL value)? For example, I have 2 series with the following values:Point Serie1 Serie20 0 01 2 32 4 63 6 NO VALUE4 8 125 10 15This is rendering 3 lines: one for serie1 and 2 discontinous lines for serie2. Can we join these 2 lines?Thanks,Shady
  4. Thank you for your quick reply. Regards, Shady
  5. Hi, I am getting this same warning everytime I create a new Chart instance. Could you please tell me if this issue was solved ? Thanks in advance, Shady
  6. Hi, I am having a problem with the setCustomFormat method found in ValueFormat. In fact I tried the pattern given in the doc: "For example, you can use the format string "##0,," to represent 100 million as 100. Numbers smaller than 1 million are displayed as 0", however it is generating an error. Could someone please tell me what I am doing wrong? Here is the code I am testing: public static void main(String[] args) { com.softwarefx.chartfx.desktop.Chart chart1 = new com.softwarefx.chartfx.desktop.Chart(); chart1.getToolBar().setVisible(true); chart1.getAxisY().getLabelsFormat().setCustomFormat("##0,,"); for(int x = 0; x < 10; x++) { chart1.getData().set(0, x, x * 1000000); } JFrame f = new JFrame(); f.getContentPane().add(chart1); f.setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE); f.setSize(new Dimension(1500, 1000)); f.setVisible(true); } And here is the error I am getting: Exception in thread "main" java.lang.IllegalArgumentException: Multiple decimal separators in pattern "##0,," at java.text.DecimalFormat.applyPattern(DecimalFormat.java:2520) at java.text.DecimalFormat.applyLocalizedPattern(DecimalFormat.java:2312) at com.softwarefx.sfxnet.System.Double.b(SourceFile:162) at com.softwarefx.chartfx.desktop.internal.ValueFormat.a(SourceFile:278) at com.softwarefx.chartfx.desktop.internal.ValueFormat.v(SourceFile:352) at com.softwarefx.chartfx.desktop.internal.Axis.a(SourceFile:2014) at com.softwarefx.chartfx.desktop.internal.Axis.a(SourceFile:2029) at com.softwarefx.chartfx.desktop.internal.Axis.a(SourceFile:1995) at com.softwarefx.chartfx.desktop.internal.Axis.a(SourceFile:2191) at com.softwarefx.chartfx.desktop.internal.Axis.a(SourceFile:1967) at com.softwarefx.chartfx.desktop.internal.Axis.a(SourceFile:1945) at com.softwarefx.chartfx.desktop.internal.AxisCollection.a(SourceFile:54) at com.softwarefx.chartfx.desktop.internal.Pane.a(SourceFile:287) at com.softwarefx.chartfx.desktop.internal.PaneCollection.a(SourceFile:94) at com.softwarefx.chartfx.desktop.internal.ScaleInfo.g(SourceFile:674) at com.softwarefx.chartfx.desktop.internal.ScaleInfo.a(SourceFile:793) at com.softwarefx.chartfx.desktop.internal.Chart.a(SourceFile:3427) at com.softwarefx.chartfx.desktop.internal.u.a(SourceFile:793) at com.softwarefx.chartfx.desktop.internal.u.a(SourceFile:438) at com.softwarefx.chartfx.desktop.internal.Internal.DockableFrameCore.a(SourceFile:211) at com.softwarefx.chartfx.desktop.internal.Internal.DockableFrameCore.a(SourceFile:141) at com.softwarefx.chartfx.desktop.internal.Chart.e(SourceFile:4387) at com.softwarefx.chartfx.desktop.internal.Chart.l(SourceFile:4213) at com.softwarefx.sfxnet.internal.df$h.propertyChange(SourceFile:1217) at com.softwarefx.chartfx.desktop.Chart.setVisible(SourceFile:2052) at com.softwarefx.chartfx.desktop.Chart.doLayout(SourceFile:2071) at java.awt.Container.validateTree(Container.java:1519) at java.awt.Container.validateTree(Container.java:1526) at java.awt.Container.validateTree(Container.java:1526) at java.awt.Container.validateTree(Container.java:1526) at java.awt.Container.validateTree(Container.java:1526) at java.awt.Container.validate(Container.java:1491) at java.awt.Window.show(Window.java:825) at java.awt.Component.show(Component.java:1422) at java.awt.Component.setVisible(Component.java:1375) at java.awt.Window.setVisible(Window.java:806) Many thanks in advance Shady
  7. Hi, I noticed that we can add user-defined commands to the toolbar, however it seems that commands only support images. Is there a way to add comboboxes to this toolbar? In fact I need something similar to the gallery choices where the user can choose between certain values. Thanks for your help
  8. Shady

    Editable Gauge

    Too bad... Anyway, thanks for your reply Regards
  9. Shady

    Editable Gauge

    Hi, I was testing the gauges and wanted to know if there is a way to edit the gauge by clicking on it (modify the value). Thanks in advance for your feedback Regards
  10. Thanks for your reply
  11. Hi I am rendering a chart with the legendBox and the dataGrid both enabled. The problem is that when I resize the chart to a small dimension where not all of these components (chart, legendBox and dataGrid) can fit, the legendBox seems to have the priority over the chart: In fact, it stays visible while the chart becomes invisible. How can I give the chart a higher priority over the legendBox so that I always keep my chart visible? Thanks for your help
  12. Hi, do you have any news about this point? I'm also interested in highlighting parts of a chart programmatically, however the highlightItem doesn't seem to work Thanks
  13. I'm still stuck, can't anyone help? Thanks
  14. Hi, I was testing the Chart Fx 7 for java and tried to add a mouse click listener to my chart. However, I discovered that the HitTestEvent doesn't support the Right/Left mouse clicks. In fact, I can't find the equivalent of the getButton() found in java.awt.MouseEvent. Am I missing something or isn't it possible to distinguish a right click from a left click in the charts? Can anyone help? Thanks ChartFXTest.zip
×
×
  • Create New...