Project

General

Profile

Actions

Support #3670

closed

Implementing conditional pen coloring in a WSeries

Added by Mikey Nosihcan over 9 years ago. Updated about 9 years ago.

Status:
Closed
Priority:
Normal
Assignee:
Target version:
-
Start date:
11/19/2014
Due date:
% Done:

0%

Estimated time:

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?

Actions #1

Updated by Koen Deforche about 9 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.

Actions #2

Updated by Koen Deforche about 9 years ago

  • Status changed from Feedback to Closed
Actions

Also available in: Atom PDF