great-tables icon indicating copy to clipboard operation
great-tables copied to clipboard

nanoplots: If `x_vals` is passed it silently overrides `line_type` curved to be straight

Open machow opened this issue 4 months ago • 0 comments

Currently, if you try to specify line_type curved, but also supply x_vals, we quietly set line_type back to straight.


_generate_nanoplot(
    y_vals=[1, 2, 3],
    x_vals=[2, 4, 6],
    show_data_line=True,
    plot_type="line",
    line_type="curved"
)

If we want to do this, then let's add a guard for x_vals at the very top, that does this one thing (warns user, and overrides their option). That way it will be very easy for us to spot, and users will know what's happening.

Currently, it happens pretty high up, but there's a little bit of extra processing that's going on in tandem.

machow avatar Mar 28 '24 17:03 machow