# Trending with Chart component

**URL:** <https://forum.inductiveautomation.com/t/trending-with-chart-component/9124>\
**Category:** Ignition\
**Created:** [September 30, 2014, 8:35pm UTC](https://forum.inductiveautomation.com/t/trending-with-chart-component/9124 "2014-09-30T20:35:29Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![mik977](https://avatars.discourse-cdn.com/v4/letter/m/5f8ce5/32.png) [@mik977](https://forum.inductiveautomation.com/u/mik977)\
**Post date:** [September 30, 2014, 8:35pm UTC](https://forum.inductiveautomation.com/t/trending-with-chart-component/9124/1 "2014-09-30T20:35:29Z")

</div>

I’ve implemented a driver for the Ignition OPC server which provides some OPC values to Ignition. Then I add a OPC tag and make it store history. I display the history in a Chart component.

For testing purposes I created a connect/disconnect button for simulation connection drops and reconnects. When connoction goes down the driver sets all OPC driver tags to a BAD quality state.

All looks fine except the trend, which I am displaying, drops to zero when the device is disconnected.

I am using the Chart component since it lets me ignore bad quality values.

Other observations:

1. the database table where trends are stored does not contain any records with floatval=0 and dataquality=192.

2. the dataset, which the Chart component uses, gets a record (the last one) with a value of 0 and thus the trend drop to 0 when the device is disconnected.

3. When the device is back on the row with value 0 dissapears and the trend is correctly plotted as new values come in.

The question is: why am I getting this row with value 0 in the dataset? ![:scratch:](https://us1.discourse-cdn.com/inductiveautomation/original/1X/76d1620bec252bfac07050c889ff5a91dc8a9c25.gif ":scratch:")

Any suggestions would be very appreciated.

Thanks
