Project

General

Profile

Actions

Bug #1359

closed

WAxis::computeRange critacal bug

Added by Jan Hrubeš over 12 years ago. Updated about 12 years ago.

Status:
Closed
Priority:
Normal
Assignee:
-
Target version:
Start date:
07/20/2012
Due date:
% Done:

0%

Estimated time:

Description

Hi,

I have run into problems with graphs. I am trying to generate a graph, with constant Y value. When the value is out of interval <--1024.0,1024.0> then program gets stuck with this message:

testGraph.wt: /home/lopata/wt-3.2.1/src/Wt/Chart/WAxis.C:714: 
void Wt::Chart::WAxis::computeRange(Wt::Chart::WChart2DRenderer&, const Wt::Chart::WAxis::Segment&) const: 
Assertion `segment.renderMinimum < segment.renderMaximum' failed.

Here is a function which generates such graph:

void TestGraph::addTestGraph(WContainerWidget* cont)
{
        double myY=1024.1;

        WStandardItemModel *md = new WStandardItemModel(3,2);
        for (int row=0; row<md->rowCount(); ++row)
        {
                md->setData( row, 0, boost::any(row+1) );
                md->setData( row, 1, boost::any( myY ) ); // !!!!!!!
        }

        Chart::WDataSeries s(1, Chart::LineSeries, Chart::YAxis);
        s.setMarker(Chart::CircleMarker);
        s.setMarkerSize(4);

        Chart::WCartesianChart *gr = new Chart::WCartesianChart(Chart::CategoryChart);
        gr->setModel(md);        
        gr->resize(500, 400);
        gr->addSeries(s);

        cont->addWidget(gr);
}
Actions #1

Updated by Jan Hrubeš over 12 years ago

I should mention that I'm using Wt 3.2.1.

regards,

Jan

Actions #2

Updated by Koen Deforche over 12 years ago

Hey Jan,

This should be fixed in Wt 3.2.2

Regards,

koen

Actions #3

Updated by Koen Deforche over 12 years ago

  • Status changed from New to Feedback
Actions #4

Updated by Koen Deforche about 12 years ago

  • Status changed from Feedback to Closed
  • Target version set to 3.2.2-p1
Actions

Also available in: Atom PDF