Giter VIP home page Giter VIP logo

graph's People

Contributors

beberlei avatar derickr avatar guillaumelecerf avatar healsdata avatar jpic avatar kore avatar lolautruche avatar madscientist159 avatar remicollet avatar sebastianbergmann avatar seifertdaniel avatar tobys avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

graph's Issues

ezcGraphGdDriver->getTextBoundings() returns null without FreeType support installed

If the gd extension is installed, but FreeType support isn't enabled, ezcGraphGdDriver->getTextBoundings() can return null because neither of the case blocks in this switch block will be executed. This can cause less than intuitive errors like the one below when calls like this one don't check the return value to ensure it's an object. It may be best to have ezcGraphGdDriver->getTextBoundings() throw an exception if no case blocks are matched.

PHP Notice:  Trying to get property of non-object in /home/matt/Software/spl-benchmarks/vendor/zetacomponents/graph/src/driver/gd.php on line 565

Utf8 labels

Hi,

in the function "testFitStringInTextBox" in driver.php
you tokenize the string using $tokens = preg_split( '/\s+/', $string );
when $string is in UTF 8 and using a 2 bytes character, the $tokens get corrupted and the labels can be turned to an empty string when the svg.php encodes() it using htmlspecialchars (returns empty string if char is wrong)

So the tokenization should take care of the encoding option !

Thank you for these components !
Nicolas.

Grid color issue with palette

Hi,

Bug Description
If I do this :

        $palette->majorGridColor = '#000000FF';
        $palette->majorGridColor = '#000000aa';
        $graph->palette = $palette;

then my graph has a major grey grid on xAxis (vertical lines) and yAxis (horizontal lines).
image

But if I do this :

        $palette->majorGridColor = '#000000FF';
        $graph->palette = $palette;
        $palette->majorGridColor = '#000000aa';

then my graph only has a major grey grid on yAxis (horizontal lines) only.
image

Questions
To sumarize, is the palette still writable after setting it to the graph ?
If I want to apply a slight palette modification on a specific Axe, do I have to clone it ?

Usecase
Actually my objective was to get only the vertical grid. This is what I did :

            $palette2 = clone $graph->palette;
            $palette2->majorGridColor = '#000000aa';
            $graph->xAxis->setFromPalette($palette2);

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.