• Global community
    • Language:
      • Deutsch
      • English
      • Español
      • Français
      • Português
  • 日本語コミュニティ
    Dedicated community for Japanese speakers
  • 한국 커뮤니티
    Dedicated community for Korean speakers
Exit
0

CF 2016 Graphs Using a Stylesheet?

New Here ,
Oct 18, 2017 Oct 18, 2017

Copy link to clipboard

Copied

Hi,

I am re-writing all the CF charts on out website and want a stylesheet to hold our coperate colours.

I am using the below JSON code at the moment by i cant find the code that specifes chartseries colours?

I want to be able to use this style sheet for any chart. There used to be a cf tag called colorlist but i belive this is only for pie charts.

Test Chart below calling cf_style_sheet_test

<!--Chart-->
<CFCHART title="Test"  format="png" style="cf_style_test" chartheight="900" chartwidth="900" yaxistitle="Spend £k" xaxistitle="Years" plot="#plot#">

<!--- Baseline - LINE--->
<CFCHARTSERIES type="line" serieslabel="Baseline">
   <cfchartdata item="15/16" value="10">
   <cfchartdata item="16/17" value="20">
   <cfchartdata item="17/18" value="30">
   <cfchartdata item="18/19" value="40">
   <cfchartdata item="19/20" value="50">
   <cfchartdata item="20/21" value="60"> 
</CFCHARTSERIES>

<!--- CA - BAR--->
<CFCHARTSERIES type="bar" serieslabel="Curr. Est.">
   <cfchartdata item="15/16" value="15">
   <cfchartdata item="16/17" value="25">
   <cfchartdata item="17/18" value="35">
   <cfchartdata item="18/19" value="45">
   <cfchartdata item="19/20" value="55">
   <cfchartdata item="20/21" value="65">
  
</CFCHARTSERIES>

</CFCHART>

My style sheet below:

{
"graphset":[
{

"type":"mixed",
"background-color":"#fff9e8",
"border-color":"#ffffff",
"border-width":0,

"title":
{
  "background-color":"#fff9e8",
  "border-width":0,
  "border-color":"#ffffff",
  "border-radius":"0px",
  "shadow":false,
  "font-size":18,
  "italic":true,
  "bold":false,
  "font-family":"Helvetica",
  "color":"#333333"
        },
  "legend":
  {
  "position":"100%, 0%",
  "border-color":"#CCCCCC",
  "background-color":"#ffffff",
  "margin-top":40,
  "layout":"x3",
  "shadow":false,
  "alpha":1
        },

"plotarea":
{
  "margin-top":15,
  "margin-left":70,
  "background-color":"#ffffff",
  "margin-right":10
        },

"source":
{
  "text": "Created by Justine",
  "font-family":"Helvetica",
  "font-size":12,
  "italic":true,
  "bold":true,
  "background-color":"#fff9e8",
  "shadow": false
}

    }
]
}

Views

735

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Advocate ,
Oct 18, 2017 Oct 18, 2017

Copy link to clipboard

Copied

Have you used the documentation? ColdFusion Help | cfchart

Is your css in a json file that is relative to the page calling the chart?

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
New Here ,
Oct 18, 2017 Oct 18, 2017

Copy link to clipboard

Copied

LATEST

Yes the JSON file is working for tile etc. but i cant get individual colours for a mulitply chart series to work.

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Resources
Documentation