All Downloads are FREE. Search and download functionalities are using the official Maven repository.

org.jetbrains.kotlinx.ggdsl.ir.scale.NonPositionalScale.kt Maven / Gradle / Ivy

There is a newer version: 0.4.0-dev-15
Show newest version
/*
* 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

/**
 * Non-positional scale interface. Non-positional scale is used in case
 * of mapping to non-positional aesthetic attribute.
 *
 * @param DomainType the type of the domain.
 * @param RangeType the type of the range.
 */
public sealed interface NonPositionalScale : Scale

/**
 * Non-positional continuous scale.
 *
 * @param DomainType the type of the domain.
 * @param RangeType the type of the range.
 * @param domainLimits the limits of the domain.
 * @param rangeLimits the limits of the range.
 */
@Serializable
public data class NonPositionalContinuousScale(
    val domainLimits: Pair? = null,
    val rangeLimits: Pair? = null,
    override val transform: NonPositionalTransform? = null,
) : ContinuousScale, NonPositionalScale

/**
 * Non-positional categorical scale.
 *
 * @param DomainType the type of the domain.
 * @param domainCategories the list of the domain categories.
 * @param rangeValues the list of the range values.
 */
@Serializable
public data class NonPositionalCategoricalScale(
    val domainCategories: TypedList? = null,
    val rangeValues: TypedList? = null,
) : CategoricalScale, NonPositionalScale

public interface CustomNonPositionalScale
    : NonPositionalScale, CustomScale




© 2015 - 2025 Weber Informatics LLC | Privacy Policy