* @brief Add a pie-chart series (convenience wrapper for `PLTYPE_PIE`). * * Each value becomes a slice sized in proportion to the total. Equivalent to * `plot_add_series(plot, NULL, values, n, label, PLTYPE_PIE, color)`. * * @param plot The plot. * @param values Slice magnitudes (non-negative). * @param n Number of slices. * @param label Series label (copied by the plot). May be NU
| 2009 | * @return The new series index, or -1 on failure. |
| 2010 | */ |
| 2011 | int plot_add_pie(Plot* plot, const float* values, size_t n, const char* label, PlotColor color) { |
| 2012 | PLOT_LOG("[plot_add_pie]: enter (plot=%p, n=%zu)", (void*)plot, n); |
| 2013 | return plot_add_series(plot, NULL, values, n, label, PLTYPE_PIE, color); |
| 2014 | } |
| 2015 | |
| 2016 | |
| 2017 | /** |
nothing calls this directly
no test coverage detected