FusionCharts PHP Class API > Advanced Usage > Setting Delimiter |
Delimiter is the character used to separate two consecutive attributes within the chart attribute list. FusionCharts uses semicolon (;) as the default delimiter. To replace the default delimiter with a new character, simply call setParamDelimiter() function and pass the new delimiter character though it as shown in the code below: |
$FC->setParamDelimiter("$"); |
Now you can use '$' as delimiter in the following statements of your program: |
$strParam="bgColor=CC66CC$canvasBgColor=BC6699$showBorder=1$borderColor=00FF00"; |
Consider the code below: |
<?php # Include FusionCharts PHP Class # Create FusionCharts PHP object # Set chart attributes $FC->setChartParams($strParam); ... # Set colon (:) as delimiter # Add a new dataset with dataset parameters # Set hash (#) as delimiter # Add aother dataset with dataset parameters ... <? ?> |
The code shows that we can use different delimiters in our programs provided the delimiter is declared before using. |