Example usage for javafx.scene.chart CategoryAxis getDisplayPosition

List of usage examples for javafx.scene.chart CategoryAxis getDisplayPosition

Introduction

In this page you can find the example usage for javafx.scene.chart CategoryAxis getDisplayPosition.

Prototype

@Override
public double getDisplayPosition(String value) 

Source Link

Document

Get the display position along this axis for a given value.

Usage

From source file:Main.java

@Override
public void start(final Stage stage) {
    stage.setWidth(500);//from   w w w.jav  a  2 s  . co  m
    stage.setHeight(500);
    Scene scene = new Scene(new Group());

    VBox root = new VBox();
    CategoryAxis lineXAxis = new CategoryAxis(getData());

    System.out.println(lineXAxis.getDisplayPosition("Sales"));

    root.getChildren().addAll(lineXAxis);
    scene.setRoot(root);

    stage.setScene(scene);
    stage.show();
}