Results 1 to 3 of 3
- 04-11-2012, 04:52 PM #1
Why yAxis only display 3 decimals?
I can't set more than 3 decimals on Y axis: this is my example code
How to display on Y axis more than 3 decimals?Java FX Code:package javafxapplication2; import javafx.application.Application; import javafx.scene.chart.CategoryAxis; import javafx.scene.chart.NumberAxis; import javafx.scene.chart.XYChart; import javafx.stage.Stage; import javafx.scene.Scene; import javafx.scene.chart.LineChart; public class JavaFXApplication2 extends Application { @Override public void start(Stage stage) { stage.setTitle("Lines plot"); final CategoryAxis xAxis = new CategoryAxis(); final NumberAxis yAxis = new NumberAxis(0.53000, 0.53910, 0.001); final LineChart<String, Number>lineChart = new LineChart<String, Number>(xAxis, yAxis); //lineChart.setTitle("Stock quotes"); lineChart.setCreateSymbols(false); lineChart.setAlternativeRowFillVisible(false); XYChart.Series series1 = new XYChart.Series(); //series1.setName("Stock 1"); series1.getData().add(new XYChart.Data("Jan", 0.53185)); series1.getData().add(new XYChart.Data("Feb", 0.532235)); series1.getData().add(new XYChart.Data("Mar", 0.53234)); series1.getData().add(new XYChart.Data("Apr", 0.538765)); series1.getData().add(new XYChart.Data("May", 0.53442)); series1.getData().add(new XYChart.Data("Jun", 0.534658)); series1.getData().add(new XYChart.Data("Jul", 0.53023)); series1.getData().add(new XYChart.Data("Aug", 0.53001)); series1.getData().add(new XYChart.Data("Sep", 0.53589)); series1.getData().add(new XYChart.Data("Oct", 0.53476)); series1.getData().add(new XYChart.Data("Nov", 0.530123)); series1.getData().add(new XYChart.Data("Dec", 0.53035)); Scene scene = new Scene(lineChart, 800, 600); lineChart.getData().addAll(series1); stage.setScene(scene); scene.getStylesheets().add(this.getClass().getResource("linechart.css").toExternalForm()); stage.show(); } public static void main(String[] args) { launch(args); } }
Thanks
Susie
- 04-11-2012, 05:51 PM #2
Re: Why yAxis only display 3 decimals?
Why do they call it rush hour when nothing moves? - Robin Williams
- 04-11-2012, 06:26 PM #3
Similar Threads
-
Help with decimals
By sabarooni in forum New To JavaReplies: 4Last Post: 11-02-2011, 02:07 AM -
Help with rounding decimals
By university123 in forum New To JavaReplies: 2Last Post: 10-04-2010, 10:28 PM -
BIG decimals
By xael in forum New To JavaReplies: 17Last Post: 10-04-2010, 10:14 AM -
Decimals in java help!!
By Gold in forum New To JavaReplies: 3Last Post: 12-09-2009, 11:25 PM -
get more decimals?!?! please help!
By michcio in forum New To JavaReplies: 7Last Post: 05-22-2008, 10:26 PM


LinkBack URL
About LinkBacks
Reply With Quote

Bookmarks