Skip to content

Commit

Permalink
Remove age structure plot (#42)
Browse files Browse the repository at this point in the history
  • Loading branch information
v6ak committed Oct 15, 2023
1 parent b01421b commit 4468fa9
Showing 1 changed file with 0 additions and 31 deletions.
31 changes: 0 additions & 31 deletions client/src/main/scala/com/v6ak/zbdb/PlotRenderer.scala
Original file line number Diff line number Diff line change
Expand Up @@ -244,37 +244,6 @@ final class PlotRenderer(participantTable: ParticipantTable) {
)
}

def ageStructurePlot(modalBodyId: String, rowsLoader: => Seq[Participant], participantTable: ParticipantTable): Unit ={
val structure = rowsLoader.groupBy(_.birthYear).toIndexedSeq.sortBy(_._1)
val ticks = js.Array(structure.map(_._1.get): _*)
val plotParams = js.Dictionary(
"title" -> "Věková struktura",
"seriesDefaults" -> js.Dictionary(
"renderer" -> BarRenderer,
"pointLabels" -> js.Dictionary(
"show" -> true
),
"shadow" -> true
),
"axes" -> js.Dictionary(
"xaxis" -> js.Dictionary(
"renderer" -> dom.window.asInstanceOf[js.Dynamic].$.jqplot.CategoryAxisRenderer,
"ticks" -> ticks
),
"yaxis" -> js.Dictionary(
"tickOptions" -> js.Dictionary(
"formatString"-> "%.0f"
)
)
),
"height" -> 500,
"legend" -> Dictionary("show" -> true)
)
val plotPoints = js.Array(js.Array(structure.map{_._2.size}: _*))
dom.window.console.log("plotPoints", ticks, plotPoints)
dom.window.asInstanceOf[js.Dynamic].$.jqplot(modalBodyId, plotPoints, plotParams)
}

private def generateSpeedPlotData(rows: Seq[Participant]) = {
val data = rows.map{p =>
PlotLine(row = p, label = p.fullName, points = js.Array(
Expand Down

0 comments on commit 4468fa9

Please sign in to comment.