XYGraph

fun <X, Y> XYGraph(xAxisModel: AxisModel<X>, yAxisModel: AxisModel<Y>, modifier: Modifier = Modifier, xAxisStyle: AxisStyle = rememberAxisStyle(), xAxisLabels: @Composable (X) -> Unit, xAxisTitle: @Composable () -> Unit = {}, yAxisStyle: AxisStyle = rememberAxisStyle(), yAxisLabels: @Composable (Y) -> Unit, yAxisTitle: @Composable () -> Unit = {}, horizontalMajorGridLineStyle: LineStyle? = KoalaPlotTheme.axis.majorGridlineStyle, horizontalMinorGridLineStyle: LineStyle? = KoalaPlotTheme.axis.minorGridlineStyle, verticalMajorGridLineStyle: LineStyle? = KoalaPlotTheme.axis.majorGridlineStyle, verticalMinorGridLineStyle: LineStyle? = KoalaPlotTheme.axis.minorGridlineStyle, panZoomEnabled: Boolean = true, content: @Composable XYGraphScope<X, Y>.() -> Unit)

Provides a set of X-Y axes and grid for displaying X-Y plots.

Parameters

X

The data type for the x-axis

Y

The data type for the y-axis

xAxisModel

x-axis state controlling the display of the axis and coordinate transformation

yAxisModel

y-axis state controlling the display of the axis and coordinate transformation

xAxisStyle

Style for the x-axis

xAxisLabels

Composable to display labels for specific x-axis values

xAxisTitle

Title for the X-axis

yAxisStyle

Style for the y-axis

yAxisLabels

Composable to display labels for specific y-axis values

yAxisTitle

Title for the y-axis

panZoomEnabled

True if the plot can be panned and zoomed, false to disable. Enabling panning and zooming may interfere with scrolling a parent container if the drag point is on the plot.

content

The content to be displayed, which should include one plot for each series to be plotted on this XYGraph.


fun <X, Y> XYGraph(xAxisModel: AxisModel<X>, yAxisModel: AxisModel<Y>, modifier: Modifier = Modifier, xAxisStyle: AxisStyle = rememberAxisStyle(), xAxisLabels: (X) -> String = { it.toString() }, xAxisTitle: String? = null, yAxisStyle: AxisStyle = rememberAxisStyle(), yAxisLabels: (Y) -> String = { it.toString() }, yAxisTitle: String? = null, horizontalMajorGridLineStyle: LineStyle? = KoalaPlotTheme.axis.majorGridlineStyle, horizontalMinorGridLineStyle: LineStyle? = KoalaPlotTheme.axis.minorGridlineStyle, verticalMajorGridLineStyle: LineStyle? = KoalaPlotTheme.axis.majorGridlineStyle, verticalMinorGridLineStyle: LineStyle? = KoalaPlotTheme.axis.minorGridlineStyle, panZoomEnabled: Boolean = true, content: @Composable XYGraphScope<X, Y>.() -> Unit)

An XYGraph overload that takes Strings for axis labels and titles instead of Composables for use cases where custom styling is not required.

Provides a set of X-Y axes and grid for displaying an X-Y plot.

Parameters

X

The data type for the x-axis

Y

The data type for the y-axis

xAxisModel

x-axis state controlling the display of the axis and coordinate transformation

yAxisModel

y-axis state controlling the display of the axis and coordinate transformation

xAxisStyle

Style for the x-axis

xAxisLabels

String factory of x-axis label Strings

xAxisTitle

Title for the X-axis

yAxisStyle

Style for the y-axis

yAxisLabels

String factory of y-axis label Strings

yAxisTitle

Title for the y-axis

panZoomEnabled

True if the plot can be panned and zoomed, false to disable. Enabling panning and zooming may interfere with scrolling a parent container if the drag point is on the plot.

content

The content to be displayed within this graph, which should include one plot for each data series to be plotted.