Project

General

Profile

Actions

Bug #4470

closed

Axis and series rendering order in WCartesianChart?

Added by Стойчо Стефанов Stoycho Stefanov over 8 years ago. Updated almost 8 years ago.

Status:
Closed
Priority:
Normal
Assignee:
Roel Standaert
Target version:
Start date:
09/11/2015
Due date:
% Done:

0%

Estimated time:

Description

Hey,

it seems to me that the rendering order should be changed as follows:

  1. render grid
  2. render axes
  3. render data series
  4. render legend
    If axes are rendered after data series (as in latest wt) it could happen that a vertical or horizontal line is covered by the axis line.

My second suggestion is to optimize bar series rendering when bar width is less or equal to the double of the pen width. I my patch I consider the case where

crisp(left) == crisp(left + width)

but it could be generalized to all cases where filling the area within the bar border is redundant.

This rendering change spares a lot of redundant plot instructions and makes a chart update much faster.

I patch currently wt by myself but it could be better to fix this in the official release.


Files

WCartesianChart.patch (1.64 KB) WCartesianChart.patch Стойчо Стефанов Stoycho Stefanov, 09/11/2015 09:49 AM
Actions #1

Updated by Koen Deforche over 8 years ago

  • Status changed from New to InProgress
  • Assignee set to Roel Standaert

Roel, do you see any issues with these changes? In light of interactive features perhaps?

Actions #2

Updated by Roel Standaert over 8 years ago

  • Status changed from InProgress to Implemented @Emweb

I've applied these changes, but not quite like the patch does:

  • The axis lines are drawn below the data series, but the labels are still drawn on top
  • When interactive features are enabled, the bar series drawing optimization is not applied, because bar width may not be 0 depending on pan and zoom
Actions #3

Updated by Стойчо Стефанов Stoycho Stefanov over 8 years ago

Thanks for fixing it in wt-3.3.5!

Before you close this issue you could consider the case when the width is not zero and "width <= 2*pen.width()", thus the rectangle does not have to be filled.

Actions #4

Updated by Koen Deforche almost 8 years ago

  • Status changed from Implemented @Emweb to Resolved
Actions #5

Updated by Koen Deforche almost 8 years ago

  • Status changed from Resolved to Closed
  • Target version changed from 3.3.5 to 3.3.6
Actions

Also available in: Atom PDF