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

org.jetbrains.kotlinx.ggdsl.letsplot.series.gather.kt Maven / Gradle / Ivy

There is a newer version: 0.4.0-dev-15
Show newest version
package org.jetbrains.kotlinx.ggdsl.letsplot.series

import org.jetbrains.kotlinx.ggdsl.dsl.internal.NamedDataPlotContext
import org.jetbrains.kotlinx.ggdsl.letsplot.position.Position
import kotlin.reflect.typeOf

public typealias Line = LineGatheringContextImmutable
public typealias Point = PointGatheringContextImmutable
public typealias Bar = BarGatheringContextImmutable

// TODO!!!
@Suppress("UNCHECKED_CAST")
public inline fun  NamedDataPlotContext.gather(
    position: Position = Position.Identity,
    noinline block: T.() -> Unit
) {
    //todo
    when (typeOf()) {
        typeOf() -> lineGather(position, block as (Line.() -> Unit))
        typeOf() -> pointGather(position, block as (Point.() -> Unit))
        typeOf() -> barGather(position, block as (Bar.() -> Unit))
    }
}




© 2015 - 2025 Weber Informatics LLC | Privacy Policy