adafruit / Adafruit_CircuitPython_DisplayIO_Layout

A Circuitpython helper library for display element layout using displayio.
MIT License
10 stars 14 forks source link

Feature Request: Line Colors for Cartesian Plot Lines #86

Open DJDevon3 opened 1 year ago

DJDevon3 commented 1 year ago

As far as I can tell there's no parameter for changing the line color with cartesian. Would like to change it depending on y-axis value. Here's my current code for the fitbit api project.

my_plane = Cartesian(
                    x=30,  # x position for the plane
                    y=60,  # y plane position
                    width=DISPLAY_WIDTH-20,  # display width
                    height=DISPLAY_HEIGHT-80,  # display height
                    xrange=(0, 14),  # x range
                    yrange=(lowest_y[0], highest_y[0]),  # y range
                    axes_color=bar_color(highest_y[0]),
                    pointer_color=TEXT_PINK,
                    axes_stroke=4,
                    major_tick_stroke=2,
                    subticks=True,
                )

screenshot1

screenshot2

Only thing I can currently colorize is the axes depending on value.