Menu icon Foundation
Pizza pie chart breaks when given 1 value and zeroes

Hi :)

i was trying out the pizza pie chart plugin and came across this problem.

nothing is rendered if you give a set of values comprised like code example 1 :

however, it works fine if you do code example 2:

but, it does not work if you do code 3 :

Apparently, if you're going to have a zero value item, its necesary to have at least two non-zero value items.

is this expected behavior ?

 <ul data-pie-id="pie">
        <li data-value="60">Water Buffalo</li>
         <li data-value="0">Duck</li>      
</ul> 

 <ul data-pie-id="pie">
        <li data-value="60">Water Buffalo</li>
         <li data-value="0">Duck</li>
          <li data-value="10">dogs</li>
         
</ul>
            

         

 <ul data-pie-id="pie">
        <li data-value="60">Water Buffalo</li>
         <li data-value="0">Duck</li>
          <li data-value="0">dogs</li>
          <li data-value="0">whales</li>
         
</ul>

pizzapie chartplugin

Hi :)

i was trying out the pizza pie chart plugin and came across this problem.

nothing is rendered if you give a set of values comprised like code example 1 :

however, it works fine if you do code example 2:

but, it does not work if you do code 3 :

Apparently, if you're going to have a zero value item, its necesary to have at least two non-zero value items.

is this expected behavior ?

 <ul data-pie-id="pie">
        <li data-value="60">Water Buffalo</li>
         <li data-value="0">Duck</li>      
</ul> 

 <ul data-pie-id="pie">
        <li data-value="60">Water Buffalo</li>
         <li data-value="0">Duck</li>
          <li data-value="10">dogs</li>
         
</ul>
            

         

 <ul data-pie-id="pie">
        <li data-value="60">Water Buffalo</li>
         <li data-value="0">Duck</li>
          <li data-value="0">dogs</li>
          <li data-value="0">whales</li>
         
</ul>
Ulises over 5 years ago

bump?