Skip to content

Update time axis raise dimension error #4769

@Beforerr

Description

@Beforerr

The following code did not work for datatime

    n = 40
    t0 = DateTime(2020)
    t = Observable(range(t0, step=Hour(1), length=n))
    y = Observable(randn(n))
    f = lines(t, y)
    t.val = range(t0, step=Hour(1), length=2n)
    y[] = randn(2n)
    f

And raise ERROR: DimensionMismatch: arrays could not be broadcast to a common size: a has axes Base.OneTo(40) and b has axes Base.OneTo(80)

However, the logic would work for float without problem

begin
    n = 40
    x = Observable(range(1; length=n))
    y = Observable(randn(n))
    f = lines(x, y)
    x.val = range(1; length=2n)
    y[] = randn(2n)
    f
end

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions