How to configurate XY chart by script

Hi everybody, how are you? I have a big question about the Report module, I need to configure an XY chart by script.

I want to set the graph with my 'pens' and for each pen, I need I choose the full scale.

now i have my reporto and i have inserted a XY Chart, and i enable the 'scripting'

'configureChart(data, chart)' it's default funciton.

now i don't now how to do.

i need the yours knowedge.

Thanks

Ok... you have a report and you are trying to use this component correct: Report - XY Chart - Ignition User Manual 8.1 - Ignition Documentation ?

Where is your data coming from?

Can you show your scripting?

Hi,
the script it's that to default:
def configureChart(data, chart):
---
Provides an opportunity to perform chart
configuration right before the report is
rendered. Report Parameters and Data Sources
are accessible via the data['myKey'] command.

Arguments:
	data: This is a map whose keys are report
	      data keys. Values should be sequences,
	      maps, scalar values, or Datasets.
	chart: A JFreeChart object that will be
	       drawn on the report.
---

in 'data' I want to pass the pens and the full scales

Yeah I've never done anything like that.

You may need to bind the data to the chart and then script the axis range.

Maybe this is a help? Report - Timeseries Chart - Ignition User Manual 8.1 - Ignition Documentation

You would need to make the pens keys for the report. You do not get the opportunity to call the configureChart() method. data is a dictionary where the keys are the data keys in the report.

i have tried to print (dir(chart)) and i have seen that its a jfreechart Component, but i don't know how to configurate it.

Well that depends on your needs and what your data looks like.

Search the forum for what you are trying to do, there are several posts detailing how to do multiple things with JFreeCharts.

Both the Classic Chart, and Easy Chart Vision components are backed by JFreeCharts, so the configurations are the same. The only difference is how you get the data to the chart.