FusionCharts ASP Class API > Advanced Usage > Other Elements' Attributes |
FusionCharts ASP Class API lets you configure attributes of various chart elements like dataset, dataplot, categories etc. In this section we will see sample usage of those functions of FusionCharts ASP Class which help in achieving this. Topics include: |
Provide categories attributes |
Attributes which are specific to <categories> element can be set using setCategoriesParams function. We will pass a delimiter (default is ";") separated list of attributes to the function. |
Example: |
Call FC.setCategoriesParams("font=Arial;fontSize=13;fontColor=ff0000") |
Provide attribute for each category |
We can configure each category while adding a category using addCategory function. This is done by passing category attributes as a list of delimiter separated attributes as the second parameter to the addCategory function. |
Example: |
Call FC.addCategory("Week 1","toolText=Sales for week 1") Call FC.addCategory("Week 2 ","toolText=Sales for second week;showlabel=1") Call FC.addCategory("Week 3 ","showlabel=0") |
Provide dataset attributes |
To provide dataset attributes we need to use the function - addDataset. It accepts the seriesName attribute of the dataset as its first parameter. The other parameter accepts a delimiter (default is ;) separated list of dataset attributes. |
The example below will add 3 datasets for a combination chart. The first two datasets with 'This Month' and 'Previous Month' as seriesName (respectively) , will be set to Primary Y-Axis and would not show data values. The third dataset with 'Total Quantity' as seriesName, will be set to Secondary Y-Axis, 5 sided anchors and various other anchor settings. |
Call FC.addDataset("This Month","showValues=0;parentYAxis=P") ... |
The chart that follows is as shown below: |
![]() |
Provide attribute to each dataplot |
setChartParams() function sets chart parameters globally. However, we may need to set specific properties to particular dataplot. To do so, we need to send the paramaters through addChartData() function while feeding data. Consider the code below: |
# Create a line chart object # add chart values and category names |
Here, we provide different alpha values for each dataplot. We also hide the data values and category names of all the data plots except the third one. Again we set a link to the third dataplot. Moreover, we also set tooltext values for third and fourth dataplot. |
![]() |
By the above mentioned way we can control the individual dataplots of Line, Bar, Area and all other charts. |