span8
span4
span8
span4
ChartGenerator was released with FME 2015.1 to replace WebCharter afterGoogle discontinued support for static image charts in its Charts API– which essentially stopped the transformer from working.This new transformer comes with additional features such as handling multiple data series,a handy image preview,new chart options (Histogram and Scatter Plot),and a more intuitive user-interface.
An inset image displays a preview of the chart.
Charts serve as an excellent way to visually communicate data that would otherwise be presented in a text-based format.Colour,chart type,and labelling can make your data pop out in an attractive way to your client or target audience.
The data will often determine the best chart type to use;Pie Charts are appropriate for displaying data that is shared among a total – such as budget allowances and election results,Bar Charts for comparing data spread amongst multiple categories – e.g.monthly sales for different departments,and Histograms or Scatter Plots for showing the distribution of data over one or two variables – often used to identify correlations.
This example creates a pie chart using municipal election data extracted from a CSV file (comma-separated values).The source data is available in the familiar row and column table format.This structure needs to be reformatted to reflect proper database normalization in order for ChartGenerator to effectively utilize the data,and the AttributeExploder Transformer takes care of this.
This is the format of the source data for municipal election results.
The municipal election results are contained in the CSV file format.
The CSV must be formatted using FME Transformers to a more robust,database structure.This is achieved using AttributeRemover,AttributeExploder,and AttributeKeeper.
Notice in the source data that all the voting districts are stored as column headers.The best practice when designing databases are to store values that share a common theme (e.g.location and vote count) in separate tables – or for FME,as separate attributes.In this workspace,AttributeExploder is designed to create two new attributes that hold only location and vote count,respectively.Instead of the vote count and location data values spread across 22 columns or attributes,they are now contained in 2.This causes the row count of the data to increase dramatically,but the information is more easily accessible for transformation and the processing time is minimally affected.ChartGenerator can use the new attributes for dynamic chart titles and creating multiple charts at once with grouping.
The source data had 10 rows – after running the AttributeExploder there are 230 rows!
Two parameters can be set before running the workspace: the voting district for the pie chart is specified,and an integer can be set to define the minimum vote count.Tester applies the filters and Sorter works in conjunction with the Explode Slice option in ChartGenerator to highlight the Candidate who received the most votes.
Translation Parameters dialog is displayed when Prompt and Run Workspace is selected.
The ChartGenerator Transformer allows the user to specify many parameters.In this workspace,the votes received is used in the Data Attribute field – which will provide the pie slices,and the Candidate name attribute is used for the labels.Title and legend font,output size,colour scheme,and displaying percentages can also be configured.
The PNG Writer exports the image created by ChartGenerator.PNG files can be easily inserted into any report documents or printed on their own.
An image similar to this will be created after running the workspace.
Hi there,
I really like this transformer.There's just one issue - the axis labelling does not work properly with negative values.It creates squares instead of the minus symbol.I'm creating a line chart,see below.That would be pretty difficult to fix for me as the output is a raster.I am working on Linux,FME 2016.1.0.1 (build 16494),x64.
Thank you for reporting this issue to us!I have tried to reproduce this behaviour but have not been successful.Please try running this simple workspace I have created for this purpose:https://www.dropbox.com/s/d47zz467fqpzlzs/csv2pngraster.fmwt?dl=0
There has been a report that notation on the axis appears incorrectly (specifically for negative numbers) if you are using a locale other than English (US).I invite you to contact our 亚搏在线Safe Support Teamsupport@亚搏在线safe.comso that we can get more details from you,and determine if the issue you are experiencing is related.
Kind regards,
Rylan
Hello,
I try to place on the x-axis a date label.But then the chartgenerator doesn't work.it creates an empty chart.I tried to use the dateformatter before the chartgenerator but the results are the same.Does the chartgenerator support date/time?
Thank you for reporting this!You will experience issues with some chart types if the attributes contain alphanumeric values.There is an existing ticket with our development team to improve the logging and handling of alphanumerics for the ChartGenerator transformer.
If you convert the date/time attribute to FME Date/Time (i.e.using the DateFormatter),then this should result in numeric values and allow you to create the line chart.
Please consider viewing this example workspace that highlights the different behaviours:https://www.dropbox.com/s/ot89ngwf7i6ne99/timedate_chart.fmw?dl=0(Note: Created with FME 2016.1.1 Build 16609).
Kind regards,
Rylan
Converting Tabular (Non-Spatial) and Spatial Data to CSV
MicroStation Text Styles in FME 2015.0 and older
Converting from CSV to PostgreSQL and PostGIS
Converting from CSV to Spatial Geometry
How to Convert CSV to Shapefile (Non-spatial to Spatial)
Advanced manipulation of Excel tables using AttributeExploder
How to Convert CSV to Microsoft Excel
Tutorial: Getting Started with CSV
© 2019 亚搏在线Safe Software Inc |Legal