This article provides guidance on how to customize chart colors and define series names in the FusionCharts configuration within Aurea CRM. This is particularly useful for users who want to assign fixed colors to specific countries and order them based on company criteria.
Customizing Chart Colors: To achieve fixed colors for specific countries in your chart diagrams:
-
Locate the JSON Configuration File:
- Find the
fusionCharts_template.json.js
file in the directory (usually within../data/charts/
).
- Find the
-
Modify the Dataset Section:
- Define the colors for each country by setting the
color
attribute within thedataset
array. Here is an example configuration:
json"dataset": [ { "seriesname": "US", "color": "008000", // Hex code for green "data": [...] }, { "seriesname": "Germany", "color": "0000FF", // Hex code for blue "data": [...] }, { "seriesname": "Spain", "color": "FFFF00", // Hex code for yellow "data": [...] } // ... other countries ]
- Define the colors for each country by setting the
Defining Series Names: The seriesname
attribute is used to label the data series in the chart:
-
Declare Series Names:
- Include the
seriesname
attribute in thedataset
array within your JSON configuration file as shown in the example above.
- Include the
-
Mapping Series Names to Data Fields:
- Ensure that the
seriesname
values are correctly mapped to the corresponding data fields within Aurea CRM. This might involve configuring the data source or query within the CRM Designer to align theseseriesname
values with the actual country data in the CRM database.
- Ensure that the
Example Query for Mapping Data Fields: Here’s an example query and JSON configuration to map data fields:
select (CoNo, Company, Country, City) from (FI) where (City<>'')
"dataset": [
{
"seriesname": "Germany",
"color": "E74035"
}
]
Steps to Ensure Proper Configuration:
-
Verify JSON Syntax:
- Ensure the syntax in your
fusionCharts_template.json.js
file is correct, especially for theseriesname
andcolor
attributes.
- Ensure the syntax in your
-
CRM Designer Configuration:
- Configure the CRM Designer to utilize your custom
fusionCharts_template.json.js
file. This might involve specifying the path to your custom JSON file within the CRM Designer settings or ensuring the file is located in the correct directory.
- Configure the CRM Designer to utilize your custom
-
Consult Documentation and Support:
- Refer to the official Aurea CRM documentation for further insights on customizing chart types:
Conclusion: If additional customization is required or you encounter difficulties, consider reaching out to Aurea's professional services team for specialized assistance and best practices.