View Source ElementTui.Components.XYGraph (ElementTuiComponents v0.1.0)

Summary

Functions

Convert the x, y values to numeric values.

This is useful for converting the x, y values to something else, For example, DateTime values need to be converted to a numeric value before plotting (e.g. seconds since epoch).

Takes a function that takes a tuple of x, y values and returns a tuple of converted x, y values.

Link to this function

render(state, screenx, screeny, screenw, screenh)

View Source
Link to this function

update_bounds(state, func)

View Source

Update/change the bounds on the graph

Accepts a function that takes the current bounds ({xmin, xmax, ymin, ymax}) and returns the new bounds.