# How do I setDomainGridlineStroke - Report Viewer - Time Series Chart Scripting

**URL:** <https://forum.inductiveautomation.com/t/how-do-i-setdomaingridlinestroke-report-viewer-time-series-chart-scripting/23234>\
**Category:** Ignition\
**Tags:** ignition79\
**Created:** [March 12, 2019, 12:20am UTC](https://forum.inductiveautomation.com/t/how-do-i-setdomaingridlinestroke-report-viewer-time-series-chart-scripting/23234 "2019-03-12T00:20:50Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![paulm1](https://sea1.discourse-cdn.com/inductiveautomation/user_avatar/forum.inductiveautomation.com/paulm1/32/5900_2.png) [@paulm1](https://forum.inductiveautomation.com/u/paulm1)\
**Post date:** [March 12, 2019, 12:20am UTC](https://forum.inductiveautomation.com/t/how-do-i-setdomaingridlinestroke-report-viewer-time-series-chart-scripting/23234/1 "2019-03-12T00:20:50Z")

</div>

In the Report environment, I am currently using the following script to change my Time Series Chart  
Gridline colors.

```
from java.awt import Color
from org.jfree.chart.plot import CategoryPlot

plot = chart.getPlot()

plot.setDomainGridlinePaint(Color.black)
plot.setRangeGridlinePaint(Color.black)

```

Now I would like to change the stroke and make these gridlines thicker.  
The script below is where I’m at with no luck so far. My last attempt I used a value of 5.5 just to see if anything changed (it did not). I don’t even know the valid input range. I am using info found at this site.  
[http://www.jfree.org/jfreechart/api/javadoc/org/jfree/chart/plot/CategoryPlot.html#setDomainGridlineStroke-java.awt.Stroke-](http://www.jfree.org/jfreechart/api/javadoc/org/jfree/chart/plot/CategoryPlot.html#setDomainGridlineStroke-java.awt.Stroke-)

```
from java.awt import Color
from org.jfree.chart.plot import CategoryPlot

plot = chart.getPlot()

plot.setDomainGridlinePaint(Color.black)
plot.setRangeGridlinePaint(Color.black)
plot.setDomainGridlineStroke(BasicStroke(5.5))
plot.setRangeGridlineStroke(BasicStroke(5.5))
```

---

<div class="post-metadata">

**Author:** ![paulm1](https://sea1.discourse-cdn.com/inductiveautomation/user_avatar/forum.inductiveautomation.com/paulm1/32/5900_2.png) [@paulm1](https://forum.inductiveautomation.com/u/paulm1)\
**Post date:** [March 19, 2019, 11:06pm UTC](https://forum.inductiveautomation.com/t/how-do-i-setdomaingridlinestroke-report-viewer-time-series-chart-scripting/23234/2 "2019-03-19T23:06:12Z")

</div>

Ignition Support helped solve this one.

```
#Import Java classes - Color & JFreeChart
from java.awt import Color
from org.jfree.chart.plot import CategoryPlot
from java.awt import BasicStroke

#Define Stroke
stroke = BasicStroke(.75)

#get Plot of Current Chart
plot = chart.getPlot()
#Set color of domain and range gridlines
plot.setDomainGridlinePaint(Color.black)
plot.setDomainGridlineStroke(stroke)
plot.setRangeGridlinePaint(Color.black)
plot.setRangeGridlineStroke(stroke)
```
