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
Provide scaleXTimeOffset for relative duration axis #468
Comments
Hi! Could you say what kind of data is in input? Is it UNIX-time, formatted strings, zero-based nanosecond events? |
Here's the use-case: apache/jmeter#674 (comment) The chart displays "arrival rate" vs "time since test started" data. I think zero-based (nano)second events would work the best, since the display of UNIX-time requires the notion of "timezone", and I do not have timezones (the meaning of the axis is "time since the beginning of the test") |
Just in case, for now, I use a numeric horizontal axis, and I perform manual scaling which adjusts units depending on the total duration. It turned out to be not that bad to show the horizontal axis as "numeric hours" or "numeric minutes". val totalDuration = time.last()
val timeUnit = when {
totalDuration > 2.5 * TimeUnit.DAYS.toSeconds(1) -> TimeUnit.DAYS
totalDuration > 2.5 * TimeUnit.HOURS.toSeconds(1) -> TimeUnit.HOURS
totalDuration > 2.5 * TimeUnit.MINUTES.toSeconds(1) -> TimeUnit.MINUTES
else -> TimeUnit.SECONDS
}
if (timeUnit != TimeUnit.SECONDS) {
val scale = 1.0 / timeUnit.toSeconds(1)
for (i in time.indices) {
time[i] *= scale
}
} |
Thank you! Will check how we can implement this. |
Thank you for your feedback! |
The use case is to show "time since test start" axis.
The axis labels should be formatted like "2h 30m", "1d 2h", "1w 2d 3h", or something like that.
The text was updated successfully, but these errors were encountered: