Hi Stanislav, On Wed, 2008-05-28 at 11:38 +0200, Stanislav Zheltov wrote: > Dear Kore, > Thank you for the reply, I didn't expect to get it so soon) > > This is a possible way around, I'll try to use it, but let's say you > want to display some results(maybe test results) and there is a > difference if the result was 0 or it wasn't tested at all (empty > value). It would be fair to draw 0 results if there is a 'zero' value > in array, but you would like to see nothing if the value is "".
PHP as weakly typed language by default does not really differentiate between "" and 0, so do we here. We accept everything, which can be casted (float, int, but also strings) - which might be expected by people directly insertig stuff fetched from some database or userinput. I would suggest to filter your array before passing to the graph component. We could of course implement such a filter system in the datasets, but this seems the wrong place for me to do this. The default action of array_filter()¹ should work fine for you, to accomplish what you are looking for. Kind regards, Kore ¹ http://docs.php.net/array_filter (Example #2) -- Mit freundlichen Grüßen / Med vennlig hilsen Kore Nordmann (GPG: 0xDDC70BBB) eZ Components Developer eZ systems Headquarters tel +49 (0) 231-9742-7750 | fax +49 (0) 231-9742-7751 [EMAIL PROTECTED] | eZ systems | ez.no
signature.asc
Description: This is a digitally signed message part
-- Components mailing list Components@lists.ez.no http://lists.ez.no/mailman/listinfo/components