# Clearing Chart Markers in Script

**URL:** <https://forum.inductiveautomation.com/t/clearing-chart-markers-in-script/20813>\
**Category:** Ignition\
**Tags:** scripting\
**Created:** [November 13, 2018, 7:01pm UTC](https://forum.inductiveautomation.com/t/clearing-chart-markers-in-script/20813 "2018-11-13T19:01:39Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![Alexander41](https://avatars.discourse-cdn.com/v4/letter/a/71e660/32.png) [@Alexander41](https://forum.inductiveautomation.com/u/Alexander41)\
**Post date:** [November 13, 2018, 7:01pm UTC](https://forum.inductiveautomation.com/t/clearing-chart-markers-in-script/20813/1 "2018-11-13T19:01:39Z")

</div>

I am using a script on a chart that marks values over a certain limit, using the jfree ValueMarker, each time the chart’s data changes (it is linked to “property change”). However, each time the script triggers it re-writes all of the markers, on top of the old markers; this causes the markers and their labels to become bold and fuzzy.

Is there a command or method I can use to clear all previous markers each time the script runs?

---

<div class="post-metadata">

**Author:** ![paul-griffith](https://sea1.discourse-cdn.com/inductiveautomation/user_avatar/forum.inductiveautomation.com/paul-griffith/32/37249_2.png) [@paul-griffith](https://forum.inductiveautomation.com/u/paul-griffith)\
**Post date:** [November 13, 2018, 8:12pm UTC](https://forum.inductiveautomation.com/t/clearing-chart-markers-in-script/20813/2 "2018-11-13T20:12:18Z")

</div>

You need to `clearRangeMarkers`/`clearDomainMarkers` as appropriate from the XYPlot: [http://www.jfree.org/jfreechart/api/javadoc/org/jfree/chart/plot/XYPlot.html#clearDomainMarkers--](http://www.jfree.org/jfreechart/api/javadoc/org/jfree/chart/plot/XYPlot.html#clearDomainMarkers--)

---

<div class="post-metadata">

**Author:** ![Alexander41](https://avatars.discourse-cdn.com/v4/letter/a/71e660/32.png) [@Alexander41](https://forum.inductiveautomation.com/u/Alexander41)\
**Post date:** [November 13, 2018, 9:38pm UTC](https://forum.inductiveautomation.com/t/clearing-chart-markers-in-script/20813/3 "2018-11-13T21:38:24Z")

</div>

Thank you, I was having trouble finding the exact command.
