Sensor statistics sum_differences_nonnegative unexpected behaviour

I tried using statistics sum_differences_nonnegative, but it seems having an unexpected behaviour.

Documentation says :

The mathematical sum of non-negative differences between subsequent source sensor measurement values within the given time and sampling size limits. The characteristic assumes that the source sensor value can only increase, but might occasionally be reset to zero. If a value is smaller than the previous value, the function assumes the previous value should have been a zero.

So i understand, that it will sum every positive value changes and omit negative ones. But when i tried, it did not this at all.

This is what i get (statistic in violet and the followed entity in blue comming from the enrgy dashboard) :

I would rather think to get somethings like this :

This is the configuration :

  - platform: statistics
    name: "Coût Total HPJB"
    entity_id: sensor.index_hpjb_cost
    state_characteristic: sum_differences_nonnegative
    max_age:
      days: 1
    precision: 3

Is this a bug ? or did i missunderstood how it work ?