Skip to content

Commit 79512cf

Browse files
committed
add month and DayOfWeek as a category
1 parent 14f9a90 commit 79512cf

File tree

1 file changed

+7
-4
lines changed
  • ggdsl-echarts/src/main/kotlin/org/jetbrains/kotlinx/ggdsl/echarts/translator

1 file changed

+7
-4
lines changed

ggdsl-echarts/src/main/kotlin/org/jetbrains/kotlinx/ggdsl/echarts/translator/Parser.kt

+7-4
Original file line numberDiff line numberDiff line change
@@ -4,9 +4,7 @@
44

55
package org.jetbrains.kotlinx.ggdsl.echarts.translator
66

7-
import kotlinx.datetime.LocalDate
8-
import kotlinx.datetime.LocalDateTime
9-
import kotlinx.datetime.LocalTime
7+
import kotlinx.datetime.*
108
import org.jetbrains.kotlinx.ggdsl.echarts.aes.NAME
119
import org.jetbrains.kotlinx.ggdsl.echarts.aes.X
1210
import org.jetbrains.kotlinx.ggdsl.echarts.aes.Y
@@ -183,7 +181,12 @@ internal class Parser(plot: Plot) {
183181
typeOf<java.time.LocalDate>(), typeOf<java.time.LocalDate?>() -> AxisType.TIME
184182

185183
typeOf<LocalTime>(), typeOf<LocalTime?>(),
186-
typeOf<java.time.LocalTime>(), typeOf<java.time.LocalTime?>() -> AxisType.CATEGORY
184+
typeOf<Month>(), typeOf<Month?>(),
185+
typeOf<DayOfWeek>(), typeOf<DayOfWeek?>(),
186+
typeOf<java.time.LocalTime>(), typeOf<java.time.LocalTime?>(),
187+
typeOf<java.time.Month>(), typeOf<java.time.Month?>(),
188+
typeOf<java.time.DayOfWeek>(), typeOf<java.time.DayOfWeek?>()
189+
-> AxisType.CATEGORY
187190

188191
else -> AxisType.VALUE
189192
}

0 commit comments

Comments
 (0)