Closed jospic closed 4 months ago
Hi @jospic next release will implement this feature
A new method has been introduced in order to assign labels on x and y labels. Instead of passing an array (which is independent from your data, resulting in several bugs and more logic to handle in order to synchronize data and labels), now a function can be directly passed to your chart in order to automatically generate labels at runtime, by specifying the format you would like to apply to your values.
ex.
# Let's give our chart a custom labelling on the X axis, by passing a function
chart.x_labels_function = func(n: float) -> String: return "%s (s)" % str( log(n / 10) )
# Now let's plot our data
chart.plot([f1], cp)
your function will be automatically called when drawing labels for your plot. If no function is specified, raw data will be used by default.
Perfect! Thanks
Hi, when overwriting axis labels, through the property x_label (or y_labels), it would be useful to update the corresponding value also in the tooltip. Thanks in advance. -j
In the flollow screenshot the x axis labels are a short date format like gg/mm: