-
Notifications
You must be signed in to change notification settings - Fork 16
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #395 from Kotlin/echarts_update
Refactor an internal API system , part 4: Echarts update
- Loading branch information
Showing
27 changed files
with
169 additions
and
151 deletions.
There are no files selected for viewing
2 changes: 1 addition & 1 deletion
2
kandy-echarts/src/main/kotlin/org/jetbrains/kotlinx/kandy/echarts/features/Stack.kt
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
2 changes: 1 addition & 1 deletion
2
kandy-echarts/src/main/kotlin/org/jetbrains/kotlinx/kandy/echarts/features/label/labels.kt
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
15 changes: 15 additions & 0 deletions
15
kandy-echarts/src/main/kotlin/org/jetbrains/kotlinx/kandy/echarts/layers/aes/WithAes.kt
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,15 @@ | ||
@file:Suppress("INVISIBLE_REFERENCE", "INVISIBLE_MEMBER") | ||
package org.jetbrains.kotlinx.kandy.echarts.layers.aes | ||
|
||
import org.jetbrains.kotlinx.kandy.dsl.internal.BindingHandler | ||
import org.jetbrains.kotlinx.kandy.dsl.internal.LayerBuilder | ||
import org.jetbrains.kotlinx.kandy.dsl.internal.bindingHandler | ||
|
||
/** | ||
* Interface for managing the aesthetic properties in [LayerBuilder]. | ||
*/ | ||
public interface WithAes | ||
|
||
@PublishedApi | ||
internal val WithAes.bindingHandler: BindingHandler | ||
get() =(this as LayerBuilder).bindingHandler |
17 changes: 8 additions & 9 deletions
17
kandy-echarts/src/main/kotlin/org/jetbrains/kotlinx/kandy/echarts/layers/aes/WithAlpha.kt
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,41 +1,40 @@ | ||
/* | ||
* 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.echarts.layers.aes | ||
|
||
import org.jetbrains.kotlinx.dataframe.DataColumn | ||
import org.jetbrains.kotlinx.dataframe.columns.ColumnReference | ||
import org.jetbrains.kotlinx.kandy.dsl.internal.BindingHandler | ||
import org.jetbrains.kotlinx.kandy.echarts.scale.EchartsNonPositionalMappingParametersContinuous | ||
import org.jetbrains.kotlinx.kandy.echarts.scale.nonPosMappingCont | ||
import org.jetbrains.kotlinx.kandy.ir.bindings.NonPositionalMapping | ||
import kotlin.reflect.KProperty | ||
|
||
public interface WithAlpha : BindingHandler { | ||
public interface WithAlpha : WithAes { | ||
public var alpha: Double? | ||
get() = null | ||
set(value) { | ||
addNonPositionalSetting(ALPHA, value) | ||
bindingHandler.addNonPositionalSetting(ALPHA, value) | ||
} | ||
|
||
public fun <T> alpha( | ||
column: ColumnReference<T>, params: EchartsNonPositionalMappingParametersContinuous<T, Double>.() -> Unit = {} | ||
): NonPositionalMapping<T, Double> = nonPosMappingCont(ALPHA, column, params) | ||
): NonPositionalMapping<T, Double> = bindingHandler.nonPosMappingCont(ALPHA, column, params) | ||
|
||
public fun <T> alpha( | ||
column: KProperty<T>, params: EchartsNonPositionalMappingParametersContinuous<T, Double>.() -> Unit = {} | ||
): NonPositionalMapping<T, Double> = nonPosMappingCont(ALPHA, column, params) | ||
): NonPositionalMapping<T, Double> = bindingHandler.nonPosMappingCont(ALPHA, column, params) | ||
|
||
public fun <T> alpha( | ||
values: Iterable<T>, name: String? = null, params: EchartsNonPositionalMappingParametersContinuous<T, Double>.() -> Unit = {} | ||
): NonPositionalMapping<T, Double> = nonPosMappingCont(ALPHA, values, name, params) | ||
): NonPositionalMapping<T, Double> = bindingHandler.nonPosMappingCont(ALPHA, values, name, params) | ||
|
||
public fun alpha( | ||
column: String, params: EchartsNonPositionalMappingParametersContinuous<*, Double>.() -> Unit = {} | ||
): NonPositionalMapping<*, Double> = nonPosMappingCont(ALPHA, column, params) | ||
): NonPositionalMapping<*, Double> = bindingHandler.nonPosMappingCont(ALPHA, column, params) | ||
|
||
public fun <T> alpha( | ||
values: DataColumn<T>, params: EchartsNonPositionalMappingParametersContinuous<T, Double>.() -> Unit = {} | ||
): NonPositionalMapping<T, Double> = nonPosMappingCont(ALPHA, values, params) | ||
): NonPositionalMapping<T, Double> = bindingHandler.nonPosMappingCont(ALPHA, values, params) | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.