2014-02-08 3 views
3

x 축이 Number 축이고 Y 축이 Category 축인 막대 차트를 만들려고합니다. 이 방법은 바가 y 축에서 시작하여 오른쪽으로 확장됩니다. 그러나 Scene Builder는 기본적으로 Number 축을 y 축으로, Category 축을 x 축으로 허용합니다.JavaFx 씬 빌더 막대 차트 축 유형 선택

누구나 달성하려는 목표를 달성하기위한 해결 방법을 알고 있습니까? 아니면 Scene Builder에서 일부 기능 옵션이 누락 되었습니까?

감사합니다.

답변

3

동일한 문제가 있습니다. GUI에서 axis tipe을 변경할 수 없습니다. 당신이 fxml를 열면 당신은 수동으로 변경할 수 있습니다

<BarChart fx:id="chart" focusTraversable="false" horizontalGridLinesVisible="true" horizontalZeroLineVisible="true" legendVisible="false" mouseTransparent="false" prefHeight="385.9999000000025" prefWidth="599.9998779296875" verticalGridLinesVisible="false" verticalZeroLineVisible="true" AnchorPane.bottomAnchor="0.0" AnchorPane.leftAnchor="0.0" AnchorPane.rightAnchor="0.0" AnchorPane.topAnchor="0.0"> 
    <yAxis> 
    <CategoryAxis side="LEFT" /> 
    </yAxis> 
    <xAxis> 
    <NumberAxis side="BOTTOM" /> 
    </xAxis> 
</BarChart> 

이 예제는 (내가 필요한) 숫자 축과 범주를 되돌립니다.

관련 문제