Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

dev branch #66

Merged
merged 15 commits into from
Dec 18, 2019
Merged
Prev Previous commit
Next Next commit
Fixed map piechart start angle.
  • Loading branch information
ISeleznev-HORIS authored and IKupriyanov-HORIS committed Dec 18, 2019
commit e60da93a5f94be7e85499d995ea5c9bb69cd1fad
3 changes: 2 additions & 1 deletion livemap/src/commonMain/kotlin/jetbrains/livemap/api/Pies.kt
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,7 @@ import jetbrains.livemap.entities.placement.ScreenOriginComponent
import jetbrains.livemap.entities.placement.WorldOriginComponent
import jetbrains.livemap.entities.rendering.*
import jetbrains.livemap.entities.rendering.Renderers.PieSectorRenderer
import kotlin.math.PI

@LiveMapDsl
class Pies(
Expand Down Expand Up @@ -60,7 +61,7 @@ class PiesFactory(
private fun splitMapPieChart(source: ChartSource): List<EcsEntity> {
val result = ArrayList<EcsEntity>()
val angles = transformValues2Angles(source.values)
var currentAngle = 0.0
var currentAngle = - PI / 2

for (i in angles.indices) {
// Do not inline - copy for closure.
Expand Down