renderer.getAxes().setAll(xAxis, yAxis)
? This should normally work but is hard to get right for all cases as axes can be set up from fxml, code or from our defaults.
make
. The common mvn commands (in build order) that I often use mvn clean compile test package install
. You can leave out also the previous ones. With the exception of mvn clean
... mvn test
implies compile
and, for example mvn install
implies compile
, test
, and package
... hope this helps.
Zoomer
plugin.
setForceZeroInRange(true)
package matt.play
import de.gsi.chart.XYChart
import de.gsi.chart.axes.spi.DefaultNumericAxis
import javafx.application.Application
import javafx.scene.Scene
import javafx.stage.Stage
fun main(args: Array<String>) {
Application.launch(ChartFXTestApp::class.java)
}
class ChartFXTestApp: Application() {
override fun start(primaryStage: Stage?) {
Stage().apply {
scene = Scene(
XYChart(
DefaultNumericAxis(
"X",
1.0,
20.0,
5.0
),
DefaultNumericAxis(
"Y",
0.0,
100.0,
10.0
)
)
)
}.show()
}
}
DefaultNumericAxis
would control which major ticks were displayed. For example, on the Y axis I was hoping for a tick at 10, 20, 30 etc. Maybe I am misunderstanding?
import de.gsi.chart.axes.spi.AxisRange
import de.gsi.chart.axes.spi.DefaultNumericAxis
class ControlledNumericAxis(
label: String,
min: Double,
max: Double,
): DefaultNumericAxis(
label,
min,
max,
5.0
) {
var controlledTickValues: MutableList<Double>? = null
override fun calculateMajorTickValues(axisLength: Double, axisRange: AxisRange?): MutableList<Double> {
return controlledTickValues ?: super.calculateMajorTickValues(axisLength, axisRange)
}
}