Hi All,
In the chart component, I am trying to change the DomainGridlineStroke as the default is dotted stroke and less in width.
I create a stroke and could not implement as its throwing error as following
11:34:11.403 [AWT-EventQueue-0] ERROR com.inductiveautomation.ignition.client.util.gui.ErrorUtil - Parse error for extension function “configureChart”
SyntaxError: (“no viable alternative at character ‘?’”, (’’, 27, 29, ‘\tplot.setDomainGridlineStroke?(b)\n’))
def configureChart(self, chart):
"""
Provides an opportunity to perform further chart configuration via
scripting. Doesn't return anything.
Arguments:
self: A reference to the component that is invoking this function.
chart: A JFreeChart object. Refer to the JFreeChart documentation for
API details.
"""
# Put your code here
from java.awt import Color
from java.awt import BasicStroke
from org.jfree.chart import renderer
from org.jfree.chart.renderer.xy import XYStepRenderer
from org.jfree.chart.renderer.xy import StandardXYItemRenderer
from org.jfree.chart.plot import XYPlot
from org.jfree.chart import plot
plot = chart.getPlot()
renderer = plot.getRenderer()
print renderer
print str(type(renderer))+"this was"
b = BasicStroke()
print type(b)
plot.setDomainGridlineStroke(b)
plot.setDomainGridlinesVisible(1)
plot.setDomainGridlinesVisible(1)
plot.setRangeGridlinesVisible(1)
plot.setRangeGridlinePaint(Color.black)
plot.setDomainGridlinePaint(Color.black)
What would be the issue?