# Using bar-chart-data in "meter reading" mode

**URL:** <https://discourse.nodered.org/t/using-bar-chart-data-in-meter-reading-mode/43918>\
**Category:** Dashboard\
**Created:** [9 April 2021 12:05 UTC](https://discourse.nodered.org/t/using-bar-chart-data-in-meter-reading-mode/43918 "2021-04-09T12:05:32Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![clickworkorange](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/clickworkorange/32/12109_2.png) [@clickworkorange](https://discourse.nodered.org/u/clickworkorange)\
**Post date:** [9 April 2021 12:05 UTC](https://discourse.nodered.org/t/using-bar-chart-data-in-meter-reading-mode/43918/1 "2021-04-09T12:05:32Z")

</div>

Hi all,

I've got [a Modbus counter](https://www.novusautomation.com/site/default.asp?Idioma=1&TroncoID=608027&SecaoID=549361&SubsecaoID=547011&Template=../catalogos/layout_produto.asp&ProdutoID=748482) which counts an event that I display on a bar chart via the [node-red-contrib-dashboard-bar-chart-data](https://github.com/arneman/node-red-contrib-dashboard-bar-chart-data) node. Since the count on the Modbus device is incremental I've enabled the "meter reading" setting of this node, so that the chart shows the difference from the previous value rather than the accumulated count. This works well, apart from when the Modbus device has been reset due to power loss, at which point it starts counting up from zero again - resulting in a _negative_ count on the bar graph. Is there a any way to avoid this?

---

<div class="post-metadata">

**Author:** ![system](https://us1.discourse-cdn.com/flex026/uploads/nodered/original/1X/d073cd938eafa2e558d7c2cd59003b3ef4963033.png) [@system](https://discourse.nodered.org/u/system)\
**Post date:** [9 May 2021 12:06 UTC](https://discourse.nodered.org/t/using-bar-chart-data-in-meter-reading-mode/43918/2 "2021-05-09T12:06:08Z")

</div>

This topic was automatically closed 30 days after the last reply. New replies are no longer allowed.
