Citizen1138x
Citizen1138x

Reputation: 43

Moving pie graphs within their plot area using coldfusion

I am experimenting with graphs in cold fusion and have attached an example. I find the the pie chart is too far to the right such that the legend overlays it. I would like to move the pie to the left and if possible also rotate them 90 degrees counter clockwise.

Is this possible?

example graphs

Sample chart code;

<cfchart format="html" chartwidth="280" chartheight="225" pieslicestyle="solid" name="lilydale" title="Lilydale court allocation (%)" showlegend="no">
    <cfchartseries type="pie" serieslabel="#tv[3]# games">
    <cfchartdata item="L1" value="#lg[1]/tv[3]#">
    <cfchartdata item="L2" value="#lg[2]/tv[3]#">
    <cfchartdata item="L3" value="#lg[3]/tv[3]#">
    <cfchartdata item="L4" value="#lg[4]/tv[3]#">
    </cfchartseries>
</cfchart>

Upvotes: 2

Views: 210

Answers (1)

Citizen1138x
Citizen1138x

Reputation: 43

The CFCHART tag supports a parameter called PlotArea. This parameter supports a "struct of keys", which I could find very little about on searches. However, I did find one question someone asked that was not working.

I got it working like this:

plotarea='#{"margin-left":"0","margin-top":"10")#'"

This moved the pie chart more to the left. A small increase to 350 from 280 pixels in the chart width gave me enough clearance with the PlotArea values to get the charts looking the way I wanted.

Upvotes: 2

Related Questions