Support #3670
closedImplementing conditional pen coloring in a WSeries
0%
Description
I am working with Cartesian/Wt::Chart::ChartType::ScatterPlot and WDataSeries/Wt::Chart::SeriesType::CurveSeries/LineSeries to plot some mathematical functions. I know how to control the color of the line rendered using WPen, WColor, and WSeries::setPen().
I would like to implement conditional coloring of individual lines or curve segments. Two examples:
Using a CurveSeries:
Plot a sine wave and show the segments _< 0_ in red, the segments _> 0_ in blue.
Using a LineSeries:
Graph a Fibonacci series, showing each value as a proportionally scaled line, showing prime numbers in the series in green, compound numbers in blue.
How do I do this?
Updated by Koen Deforche almost 10 years ago
- Status changed from New to Feedback
- Assignee set to Koen Deforche
This is currently not possible: you can customize the color of a marker or a bar (in a bar chart) per data point by passing data as MarkerPenColorRole and BarPenColorRole, but this is not used for rendering the line or curve which is rendered as a single 'path'. The only solution for you is to use a different series per color.
Updated by Koen Deforche almost 10 years ago
- Status changed from Feedback to Closed