Trend color issue

def runAction(self, event):
	end = self.getSibling("DateTimeInput_0").props.value
	start = self.getSibling("DateTimeInput").props.value
	ds = system.tag.queryTagHistory(
		paths=['[CPMS_TRIAL1/ignition-desktop-eeasmk4:cpms_trial]1_mfm_1-1_mfm_40/1_mfm_7'],
		startDate=start,
		endDate=end,
		returnSize=200,
	)
	if len(self.getSibling("TimeSeriesChart").props.series) == 0:
		self.getSibling("TimeSeriesChart").props.series.append({
			"name": "",
			"data": [],
			"style": {},
			"render": "line"
		})

	# Get the actual tag name from the dataset
	columnNames = ds.getColumnNames()
	if len(columnNames) < 2:
		system.perspective.print("Unexpected dataset structure: " + str(columnNames))
		return
	tagColumn = columnNames[1].strip()
	system.perspective.print(tagColumn)# index 0 is usually 'timestamp'
	self.getSibling("TimeSeriesChart").props.autoGenerateSeriesStyles = False
	series = self.getSibling("TimeSeriesChart").props.series[0]
	series.data = ds
	series.name = tagColumn
	series.render = "line"
	series.style = {"stroke": "#00ff00"}
	self.getSibling("TimeSeriesChart").props.plots[0].trends = [
		{
			"data": tagColumn,
			"visible": True,
			"color": "#00ff00",
			"lineStyle": "solid",
			"lineWidth": 2
		}
	]

I am using this script to show trend.
I have defined green color for both series and plot in script, but the trend is shown in reddish color
Why?

You aren't populating the trend properly. data exists under series and color exists under trend columns:

EDIT: Oh now I see you do have the data in the right place, but the "data" in the trend at the end should be "series", and the color/style needs to go under columns:

self.getSibling("TimeSeriesChart").props.plots[0].trends = [
		{
			"series": tagColumn,
			"visible": True,
			"columns": [
						"key": "____"
						"color": "#00ff00"
			]
		}