0

[javafx] [linechart] fx8+

is possible to plot a red region in my linechart... i will explain this better

..i would give to the user a visible "red zone" for understand that a value is to highter than a fixed (final) value, in this case 1000

i can place a screen but not code, or i will be fired XD

javafx linechart

i spent about 2 hours for search a solution... any ideas?

  • 1
    You could just add a rectangle to the plot children: see https://stackoverflow.com/questions/38871202/how-to-add-shapes-on-javafx-linechart?utm_medium=organic&utm_source=google_rich_qa&utm_campaign=google_rich_qa – James_D May 22 '18 at 17:07
  • Is a great idea... is not the solution for the answer but solved my specific problem.. how.. added a label on node when the value is hither then limit... little code snippet for readers XYChart.Data data=new XYChart.Data(time,value); if(value>1000) data.setNode(new Label(""+value)); ty James! – Fabrizio Scarponi May 22 '18 at 17:26
  • 2
    But if all you want is a red region representing the "out of range" values, why not use the same technique to give you that? – James_D May 22 '18 at 17:27
  • 1
    Related, but slightly different: [How to add a value marker to JavaFX chart?](https://stackoverflow.com/questions/15615881/how-to-add-a-value-marker-to-javafx-chart) and [Adding a line in a JavaFX chart](https://stackoverflow.com/questions/24232931/adding-a-line-in-a-javafx-chart) – jewelsea May 22 '18 at 17:43

0 Answers0