org.jetbrains.kotlinx.kandy.letsplot.feature.Reversed.kt Maven / Gradle / Ivy
The newest version!
/*
* Copyright 2020-2023 JetBrains s.r.o. Use of this source code is governed by the Apache 2.0 license.
*/
@file:Suppress("INVISIBLE_REFERENCE", "INVISIBLE_MEMBER")
package org.jetbrains.kotlinx.kandy.letsplot.feature
import org.jetbrains.kotlinx.kandy.dsl.internal.LayerBuilder
import org.jetbrains.kotlinx.kandy.dsl.internal.layerFeatures
import org.jetbrains.kotlinx.kandy.ir.feature.FeatureName
import org.jetbrains.kotlinx.kandy.ir.feature.LayerFeature
/**
* Indicates whether the axes in the layer should be reversed.
*
* When set to `true`, the direction of the axes will be reversed.
* For example, a y-axis that normally goes from bottom to top could go from top to bottom.
*
* > **Warning**: The API `reversed` will be revised in future releases.
*
* @see [Reversed]
*/
public var LayerBuilder.reversed: Boolean
get() = true // TODO(https://github.com/Kotlin/kandy/issues/412)
set(value) {
layerFeatures[Reversed.FEATURE_NAME] = Reversed(value)
}
/**
* Represents the `reversed` feature data for the layer.
*
* This feature controls the direction of the axes in the layer.
* If [value] is set to true, the direction of the axes will be reversed.
*
* @property value Indicates whether the axes should be reversed.
*/
public data class Reversed(val value: Boolean) : LayerFeature {
override val featureName: FeatureName = FEATURE_NAME
public companion object {
public val FEATURE_NAME: FeatureName = FeatureName("reversed")
}
}
© 2015 - 2024 Weber Informatics LLC | Privacy Policy