Skip to content
This repository

Closed polygon (lines), not being filled correctly. #533

Open
dnschnur opened this Issue · 3 comments

1 participant

David Schnur
David Schnur
Owner

Original author: sidgoel...@gmail.com (January 18, 2011 07:51:19)

Similar to Defect ID #448.

For the closed polygon below:
[(-1000, -1000), (66.7, 66.7), (-1000, -4200), (-1000, -1000)]
Flot rendered the attached image. Pls note, the intended region was the area between the 2 plotted lines.

For the data above, the following properties were set:
{lineWidth: 1, show: true, fill: true}

Is this a bug? If it is, it may be similar to Defect ID #448. It'll really help if this can be fixed. Thank you.

Original issue: http://code.google.com/p/flot/issues/detail?id=454

David Schnur
Owner

From olau%iol...@gtempaccount.com on January 21, 2011 20:50:02
It sure looks like a bug. If could provide a ready to run little example, that would speed up debugging - if you're feeling adventurous, you could even try and help debugging it. :)

David Schnur
Owner

From sidgoel...@gmail.com on January 22, 2011 04:39:56
I'll send an example 1st thing Monday morning so you should be able to
reproduce the error at your end.

David Schnur
Owner

From sidgoel...@gmail.com on January 24, 2011 07:12:43
Hi,

Pls find a short text case to generate the error shown in Issue #454.


In Php:
$options['series']['lines']['show'] = true;
$options['series']['lines']['lineWidth'] = 1;
$options['series']['lines']['shadowSize'] = 0;

    $options['series']['points']['show'] = true;
    $options['series']['points']['radius'] = 1;
    $options['series']['points']['symbol'] = 'circle';

    $options['grid']['show'] = true;
    $options['grid']['hoverable'] = true;
    $options['grid']['clickable'] = true;

    $options['xaxis']['min'] = -100;
    $options['xaxis']['max'] = 100;
    $options['yaxis']['min'] = -50;
    $options['yaxis']['max'] = 50;

    $options['xaxis']['tickSize'] = 10; //ceil(($options['xaxis']['max']
  • $options['xaxis']['min'])/20);
    $options['yaxis']['tickSize'] = 10;

    $rawdata[0]['data'] = array(// x-axis;
            array($options['xaxis']['min'], 0),
            array($options['xaxis']['max'], 0),
        );
    $rawdata[0]['label'] = "x-axis";
    $rawdata[0]['lines']['linewidth'] = 0.5;
    $rawdata[0]['lines']['show'] = true;
    $rawdata[0]['lines']['fillColor'] = 'grey';
    $rawdata[0]['color'] = 'black';
    
    $rawdata[1]['data'] = array(// y-axis;
            array(0, $options['yaxis']['min']),
            array(0, $options['yaxis']['max']),
        );
    $rawdata[1]['label'] = "y-axis";
    $rawdata[1]['lines']['linewidth'] = 0.5;
    $rawdata[1]['lines']['show'] = true;
    $rawdata[1]['lines']['fillColor'] = 'grey';
    $rawdata[1]['color'] = 'black';
    

In jQuery:
data = [[-1000, -1000], [66.7, 66.7], [-1000, -4200], [-1000,
-1000]];
lines = {lineWidth: 1, show: true, fill: true};
rawdata[2] = {data: data, lines: lines, label: 'the region'};
jQuery.plot('#twoD_graph', rawdata, options);

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Something went wrong with that request. Please try again.