* @brief Minimum y of the series at @p index. * * Performs a single linear scan over the series' yData buffer and * writes the smallest value found into @p *out. The function is O(n) * in the series length and reads nothing else from @p plot. * * @param plot Plot to query. Must be non-NULL. * @param index Zero-based series index. Must be in range. * @param out Receives the minimum on su
| 1640 | * |
| 1641 | * @return true on success; false if @p plot is NULL or @p index is |
| 1642 | * out of range. |
| 1643 | */ |
| 1644 | bool plot_set_series_color(Plot* plot, size_t index, PlotColor color) { |
| 1645 | PLOT_LOG("[plot_set_series_color]: enter (plot=%p, index=%zu)", (void*)plot, index); |
| 1646 | if (!plot || index >= plot->seriesCount) { |
| 1647 | PLOT_LOG("[plot_set_series_color]: bad arg or OOR -> false"); |
| 1648 | return false; |
| 1649 | } |
| 1650 | |
| 1651 | plot->series[index].color = color; |
| 1652 | PLOT_LOG("[plot_set_series_color]: exit -> true"); |
| 1653 | |
| 1654 | return true; |
| 1655 | } |
| 1656 | |
| 1657 | |
| 1658 | /** |
| 1659 | * @brief Change the drawing style of the series at @p index. |
| 1660 | * |
| 1661 | * Reinterprets the same underlying x/y data as a different visual |
| 1662 | * style — for instance, swapping a line plot for a bar chart without |
| 1663 | * having to remove and re-add the series. The data, label, and colour |
| 1664 | * are preserved. |
| 1665 | * |
| 1666 | * @param plot Target plot. Must be non-NULL. |
nothing calls this directly
no outgoing calls
no test coverage detected