Closed clarkliming closed 4 months ago
One more improvement for numeric x-aix: allow ticks and ticks labels.
I thought we had continuous x-axis from this request below? https://github.com/insightsengineering/chevron/issues/360
@barnett11 you're right, after updating citril/chevron to the latest version, I can get the numeric x-axis. However, the ticks and tick labels still cannot be cusomized
ah ok, my bad; this is the variable name conversion, not the x value conversion
I think we need an update in tern::g_lineplot
to be able to pass the tick labels while keeping the table. What do you think @edelarua ?
Currently the user can add these customizations in themselves using scale_x_continuous()
, but we should be able to add this in to g_lineplot
as well, similarly to the xticks
argument to g_km
.
I have opened a PR for this in tern
: https://github.com/insightsengineering/tern/pull/1244
I am closing this issue because changes in tern now allow this customization in chevron without further changes needed, e.g.
run(mng01, syn_data, dataset = "adlb", x_var = c("AVISITN"), xticks = c("a" = -3, "b" = 0, "c" = 3), xlim = c(-2, 8))
observedresults
https://github.com/insightsengineering/chevron/blob/ea38d6c137045683179e81ea2d9ca5aac74cd4d2/R/mng01.R#L80
it seems that we allow numeric input in the validation, but it is then converted to character.
in addition, in preprocessing we already have the dunlin::ls_unite call. this couls be improved