How do I change CFCHART title font?

I am using the WebCharts3D interface to create and modify charts, and then using the generated XML style as an in-line style in my Coldfusion code.

So this shows up correctly in the WebCharts3D:

<?xml version="1.0" encoding="UTF-8"?>
<pieChart depth="Double" style="Solid">
          <title font="Arial-18-bold">
               <decoration style="None"/>This is a title
          </title>
</pieChart>

This simply shows the example title with no box around it, and set to the desired font size and weight. You can take this code, copy it into the WebCharts "XML Style" window, apply it, and see that it works.

I use this in my Coldfusion code like this:

<cfsavecontent variable="piecontent">
<?xml version="1.0" encoding="UTF-8"?>
<pieChart depth="Double" style="Solid">
          <title font="Arial-18-bold">
               <decoration style="None"/>This is a title
          </title>
</pieChart>
</cfsavecontent>

<cfchart name="mychart" format="png" 
    style="#piecontent#">
  <cfchartseries type= "pie">
        <cfchartdata item="sample1" value="10">
        <cfchartdata item="sample2" value="20">
  </cfchartseries>
</cfchart>

The title correctly has "decoration" set to "none", because there is no box around it, but the title font size and weight is totally ignored. Is this a bug? Is there a workaround?

EDIT: It appears that this problem of ignored font size and weight is ALSO true for the overall font, like if you put this: <pieChart depth="Double" style="Solid" font="Arial-16-Bold">.

Answers


It seems like those particular settings are ignored in favor of the cfchart tag's font attributes. Try using those instead:

<cfchart format="png" font="Arial" fontBold="true" fontSize="18">

EDIT: While the above works with pie charts (only), it seems like another bug... What does work is interfacing with webcharts directly. It is more involved, but offers complete control over chart settings.


Need Your Help

'omnifaces.SelectItemsConverter' converter id is not registered

jsf jsf-2 primefaces omnifaces

I'm trying to create a selectManyCheckbox feature in my application, but now I'm in "converter problem". To take care this, I'm trying to use Omnifaces that already have a converter to objects.

About UNIX Resources Network

Original, collect and organize Developers related documents, information and materials, contains jQuery, Html, CSS, MySQL, .NET, ASP.NET, SQL, objective-c, iPhone, Ruby on Rails, C, SQL Server, Ruby, Arrays, Regex, ASP.NET MVC, WPF, XML, Ajax, DataBase, and so on.