Skip to content
This repository has been archived by the owner on Sep 28, 2024. It is now read-only.

Commit

Permalink
Merge pull request #1141 from HoldYourWaffle/patch-1
Browse files Browse the repository at this point in the history
Add destructuring operators to XYChart.Data
  • Loading branch information
edvin authored Dec 30, 2019
2 parents ac78a1b + 96ba4d4 commit 8e49230
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion src/main/java/tornadofx/Charts.kt
Original file line number Diff line number Diff line change
Expand Up @@ -117,4 +117,7 @@ fun <X, Y, ChartType : XYChart<X, Y>> ChartType.multiseries(vararg names: String
val multiSeries = MultiSeries(series, this).also(op)
data.addAll(series)
return multiSeries
}
}

operator fun <X, Y> XYChart.Data<X, Y>.component1(): X = xValue;
operator fun <X, Y> XYChart.Data<X, Y>.component2(): Y = yValue;

0 comments on commit 8e49230

Please sign in to comment.