Hello Pierre,
As discussed in today’s call.
In pareto chart, there are 2 axis one for bar and other for cumulative line. we would like to apply x axis zoom only for bar axis and keep cumulative x axis as is.
Please let us know how to do that
How to Zoom only on pareto bar and not cumulative line axis. See Top axis and Bottom axis
Referring here ParetoSample from vertical project:
fun VizContainer.pareto(data: List<DefectCount>, paretoData: List<Double>) =
chart(data) {
config {
padding = Padding(10.0, 23.0, 10.0, 10.0)
performanceMode = true
events {
highlightMode = HighlightMode.Single
zoomMode = ZoomMode.X
}
}
val type = discrete({ domain.type }) {
formatter = { this.label }
}
val count = quantitative({ domain.count.toDouble() }) {
name = "Defect Count"
formatter = { this?.toInt().toString() }
}
val cumul = quantitative( { paretoData[indexInData] } ) {
formatter = { "${this?.toInt()}%" }
name = "Cumulative percentage"
}
bar(count, type) {
x {
min = .0
start = .0
}
stacking = Stacking.Standard
strokeColor = discrete({ config.mark.strokeColors[3 - indexInData] })
strokeColorHighlight = discrete({ config.mark.strokeColorsHighlight[3 - indexInData] })
fill = discrete({ config.mark.fills[3 - indexInData] })
fillHighlight = discrete({ config.mark.fillsHighlight[3 - indexInData] })
}
line(cumul, type) {
x {
min = .0
start = .0
layoutPosition = LayoutPosition.Top
strokeColor = Colors.Web.darkred
fontColor = Colors.Web.darkred
tickStroke = Colors.Web.darkred
}
strokeColor = constant(Colors.Web.darkred)
strokeColorHighlight = constant(Colors.Web.darkred)
symbol = constant(Symbols.Square)
size = constant(15.0)
}
}
Many Thanks!