How to set xticks dependent on Observable?

I have an Observable figure dependent on the vector called sortvalues. It perfectly updates except the xticks:

  1. when i put:
    axleft.xticks = sortvalues
    it shows an error:
    It is disallowed to set xticks, an Observable field of the Makie.Axis struct, to an Observable with dot notation (setproperty!), because this would replace the existing Observable. If you really want to do this, use setfield! instead.

  2. When I put:

axleft.xticks =    [
            minimum(to_value(sortvalues)),
            maximum(to_value(sortvalues)),
        ]

It takes xticks of the first instance of Observable vector and do not update them anymore.
How to make it updateable?

I tried:

vec = @lift([minimum($sortvalues), maximum($sortvalues)])
setfield!(axleft, :xticks, vec)

But it gave me weird error:

ERROR: TypeError: in setfield!, expected Observable{Any}, got a value of type Observable{Vector{Float64}}

How that even possible?
Any should accept any type, right?

The error message tells you that you may not update the value to an Observable. So you have to either extract the values out of your observable with [] or create the Axis with xticks = observable

I created but in that case it just doesn’t updates.
I also realized that I also want to make limits dependent on Observable. The same problem:

  • it doesn’t updates with Axis(limits = (to_value(@lift(minimum($sortvalues))), to_value(@lift(maximum($sortvalues))), 1, size(to_value(sortvalues), 1)))
  • it gives a Method error with Axis(limits = (@lift(minimum($sortvalues)), @lift(maximum($sortvalues)), 1, size(to_value(sortvalues), 1)))

It seems like this functionality doesn’t exists yet and it should be created

limits = @lift((minimum($sortvalues), maximum($sortvalues), 1, size($sortvalues, 1))),