org.jetbrains.kotlinx.ggdsl.ir.scale.PositionalScale.kt Maven / Gradle / Ivy
/*
* Copyright 2020-2022 JetBrains s.r.o. Use of this source code is governed by the Apache 2.0 license.
*/
package org.jetbrains.kotlinx.ggdsl.ir.scale
import kotlinx.serialization.Serializable
import org.jetbrains.kotlinx.ggdsl.ir.data.TypedList
import org.jetbrains.kotlinx.ggdsl.util.serialization.TypedValue
/**
* Positional scale interface. Positional scale is used in case
* of mapping to positional aesthetic attribute.
* It has an implicit range.
*
* @param DomainType the type of the domain.
*/
public sealed interface PositionalScale : Scale
/**
* Positional continuous scale.
*
* @param DomainType the type of the domain.
* @param limits the limits of the domain.
*/
@Serializable
public data class PositionalContinuousScale(
val limits: Pair? = null,
override val transform: PositionalTransform? = null,
) : ContinuousScale, PositionalScale
/**
* Positional categorical scale.
*
* @param DomainType the type of the domain.
* @param categories the list of the domain categories.
*/
@Serializable
public data class PositionalCategoricalScale(
val categories: TypedList? = null,
) : CategoricalScale, PositionalScale
© 2015 - 2025 Weber Informatics LLC | Privacy Policy