Skip to main content

Hi,

 

Can someone help me with the Chartgenerator transformer.

 

As a result I plot a pdf that looks like this:

 

 

The only thing that I would like to do is to plot the values of the points as text labels next to the points. Like what was done before in EXCEL. 

 

Can anyone here help me to get labels next to my points?

 

Thanks in advance.

 

Hello @jobvdnoort 

Unfortunately, the ChartGenerator doesn’t have a parameter that allows the user to specify adding data labels to the chart. I will an enhancement request to add support for this in the ChartGenerator.

There are several workarounds. FME ships the matplotlib Python library already so if you are familiar with Python, you can call matplotlib in a PythonCaller to create the charts.

An alternative that doesn’t require Python is to generate a scatter plot chart with the same parameters as the line chart, get the position of the points by extracting the data points from the raster as vector points, create text labels from the points, and then overlay them on the line chart using a VectorOnRasterOverlayer.

I have attached an example workspace demonstrating both approaches, and I hope it helps.


@debbiatsafe 

Thank you for the 2 examples, this is exactly what I need!


Reply