Manishkumar

change font size of fusion chart

Recommended Posts

I changed font size of labels for chart by adding 'fontSize' property.
One label is displayed from fusionchart.js file where it sets the fontSize.
Is there any  way to changed the font size.
In attached image 0,16k,32k,49k,65k label numbering font is not updated.
As per code analysis -
 
“Label Group” numbering is displayed through below code.
 
<gxmlns="http://www.w3.org/2000/svg"class="raphael-group-52-dataset-top-label" 
font-family="Verdana,sans"font-size="10px"font-style="normal"font-weight="normal"
style="font-family: Verdana,sans; font-size: 10px; font-style: normal; font-weight: normal;"
transform="matrix(1 0 0 1 0 0)">
<textstyle="text-anchor: end;"fill="#000000"fill-opacity="1"stroke="none"text-anchor="end"x="154.76"y="417">0</text>
<textstyle="text-anchor: end;"fill="#000000"fill-opacity="1"stroke="none"text-anchor="end"x="235.8797"y="221">16K</text>
<textstyle="text-anchor: middle;"fill="#000000"fill-opacity="1"stroke="none"text-anchor="middle"x="431.72"y="140">32K</text>
<textstyle="text-anchor: start;"fill="#000000"fill-opacity="1"stroke="none"text-anchor="start"x="627.5603"y="221">49K</text>
<textstyle="text-anchor: start;"fill="#000000"fill-opacity="1"stroke="none"text-anchor="start"x="708.68"y="417">65K</text>
</g>
 
Class "raphael-group-52-dataset-top-label"is created in fusionchart.js and font

Share this post


Link to post
Share on other sites

Hi,

 

You can set the font size for all the text elements on the chart by setting the "baseFontSize" attribute in the chart-level dataSource.

Also you an set the "labelFontSize" attribute for individual data objects of single-series chart types for setting the font property for individual x-axis labels.

Please refer to the sample fiddle for the above mentioned attributes : http://jsfiddle.net/btuzvk5c/

Refer to this documentation link for possible font configuration : https://www.fusioncharts.com/dev/chart-guide/chart-configurations/fonts#customize-base-font-group

If you still face any problem, please share your chart dataSource, we would check and suggest you accordingly.

 

Thanks,

Akash.

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now