# cumulative attribute

Type: | boolean
Inherited: | no
Used By: | areagraph
Default: | true

If this is set to true, the areagraph adds the values of the separate curves together to form a total.
So if the first curve returned a value of 2 and the second curve returned a value of 3, the second curve would actually be plotted at 5. If your data is already accumulated, set this to "false", and be aware that having totals less than the sum of their parts will lead to strange results.

This graph shows the total number of fruit.

    <areagraph cumulative="true">
      <datacurve name="Apples">
        <sample x="1" y="2"/>
        <sample x="2" y="4"/>
      </datacurve>
      <datacurve name="Oranges">
        <sample x="1" y="3"/>
        <sample x="2" y="5"/>
      </datacurve>
    </areagraph>

This graph shows the same data, but the data is pre-accumulated

    <areagraph cumulative="false">
      <datacurve name="Apples">
        <sample x="1" y="2"/>
        <sample x="2" y="4"/>
      </datacurve>
      <datacurve name="Oranges">
        <sample x="1" y="5"/>
        <sample x="2" y="9"/>
      </datacurve>
    </areagraph>