Monday, July 18, 2005

Modifying look and feel of charts - Part I (very Basic)

You will need to use custom styles for this. Macromedia experience design team has designed the various style files that are lying in the <cfusion-install>\charting\styles directory. If you want to modify the look and feel of the charts that you create you will need to create your own custom files by modifying these default style files and using the "style" attribute in the <cfchart> tag. I will demonstrate this by increasing the width of lines in line charts.

By default the style that is used for bar/line charts is - default.xml and the one for pie charts is - default_pie.xml.

Before applying the style file our chart looks like this

The corresponding code for this chart is:

<cfchart format="png"
scalefrom="-100" scaleTo="100" gridlines="5">
<cfchartseries type="line">
<cfchartdata item="Point1" value="-50">
<cfchartdata item="Point2" value="-25">
<cfchartdata item="Point3" value="1">
<cfchartdata item="Point4" value="25">
<cfchartdata item="Point5" value="50">
<cfchartdata item="Point6" value="75">
<cfchartdata item="Point7" value="99">
</cfchartseries>
</cfchart>


Creating your own style file.
(this is the style file you will get - mystyle.xml)
  • Copy the default.xml file in <cfusion-install>\charting\styles directory to the directory where you have the .cfm of your line chart.
  • Rename this "default.xml" to "mystyle.xml"
  • For changing the line width the attribute that is used is "linewidth", in the <element> child tag of the xml document.
  • Locate this line in the xml document:
    <elements action="" shape="Area"
    drawOutline="false">
    modify it to the following:
    <elements action="" shape="Area"
    drawOutline="false" lineWidth="6">
  • Save the file, you have now created a custom style file.


Applying custom styles to charts
We will now apply the style file "mystyle.xml" we created above to our chart. This is very easy to do just use the "style" attribute in <cfchart> tag. Our code will now become:

<cfchart format="png"
scalefrom="-100" scaleTo="100" gridlines="5"
style="mystyle.xml">
<cfchartseries type="line">
<cfchartdata item="Point1" value="-50">
<cfchartdata item="Point2" value="-25">
<cfchartdata item="Point3" value="1">
<cfchartdata item="Point4" value="25">
<cfchartdata item="Point5" value="50">
<cfchartdata item="Point6" value="75">
<cfchartdata item="Point7" value="99">
</cfchartseries>
</cfchart>

and our graph will look like:


Comparison
Default line width

Line width = 6

229 comments:

«Oldest   ‹Older   201 – 229 of 229
Anonymous said...

There are several designs which you can try on our own t-shirts.
When men and women go away the qualified earth, they
use t-shirts.

Check out my web-site - gsa search engine ranker

Anonymous said...

As the the name goes, these social storage sites enable mingling.
Still , allow room for that bloggers true say to
come via.

my blog post ... gsa search engine ranker

Anonymous said...

Koh Samui bungalows give a little more homely comfort.
Real estate is also was considered to further a model's business and heavy duty interests.

Here is my weblog: gsa search engine ranker

Anonymous said...

Now, give your endeavor a homey touch at Kauai vacation
home rental.

Also visit my website - gsa search engine ranker

Anonymous said...

However, there are a few downsides that end up being noted.
In this particular case consider detox protocols several years before an utilization of is submitted.


Also visit my web page ... gsa search engine ranker

Anonymous said...

Few most important tools along with his value are released here.

As long so you have an excellent internet connection of your home or office computer.



Feel free to surf to my web page; gsa search engine ranker

Anonymous said...

Now, an online business enterprise can facilitate financial dealings with foreign families easily.



my web page :: gsa search engine ranker

Anonymous said...

You will feel a functional little bit along with a sting.
Are going to take a take into account just one of the many Medicare other
plans, plan And.

Take a look at my homepage: gsa search engine ranker

Anonymous said...

So you should take some important points from fitting Registry Winner
app.

my blog post; gsa search engine ranker

Anonymous said...

All your cells need outside and your cardio needs activity keep strong
and fantastic. City Homes did not too return
a cost comment.

Look at my webpage; gsa search engine ranker

Anonymous said...

Homestays and bungalows are the best modes akin to accommodation on village tours in Kerala.
The rooms can be chosen as documented in to individual want to do.


Review my web-site ... gsa search engine ranker

Anonymous said...

Changing our eating plan should because of this have a functional effect on each of
our health. Large stools are better provided they actually are not hard.


my page :: gsa search engine ranker

Anonymous said...

In addition, it happens to become the most effective, precisely as it provides remarkable information.
This has this eroding effect on concrete over available free time.



Stop by my site gsa search engine ranker

Anonymous said...

Now you may possibly think if is actually really important to use Solicitors in Luton?
They will attain everything that these companies can for which
in turn to happen.

Check out my blog post ... gsa search engine ranker

Anonymous said...

Tot locks prevent children from opening its washing machine during the wash cycle.


My page :: gsa search engine ranker

Anonymous said...

Somebody can have that you simply great time attentiveness to your preference genre of your
favorite songs with these means. The folk riffs
include the issues of day to be able to day life.


My blog post; gsa search engine ranker

Anonymous said...

The location must be in a secured and riots likely zone. You can gain
of several residence options within as well near the silicone plantations.


Visit my site: gsa search engine ranker

Anonymous said...

Besides the environment, the grant developed it economical too,' Bahor said. Once they are with no longer properly working, they must nevertheless be uninstalled.

Have a look at my page: gsa search engine ranker

Anonymous said...

Readers are far more about to become loyal if they feel they know you.
Make sure you use easy-to-read bullet tips and sub-headings.



my homepage ... pozycjonowanie

Anonymous said...

This is and in particular desirable in commercially produced wear T-shirts.
They can be the desired ice breakers found on nay gathering or it may be party.


Feel free to surf to my blog post pozycjonowanie

Anonymous said...

There are between workers formalities to full-blown and also
the paper work very less. It requires off you stress and make you'll taste the outcomes.

Here is my website pozycjonowanie

Anonymous said...

Because of this, your child often feel comfortable going to
you. I had already been singing and dancing with these people for two years already!



Have a look at my webpage :: pozycjonowanie

Anonymous said...

However there are very few that offer high quality and at
cheapest prices.

Here is my web site - pozycjonowanie

Anonymous said...

If it turns out not, then your entire family should hire a lawyer.
If, perhaps both parties agree, you have typically the option of wonderful out of constitution settlement.



Also visit my site - pozycjonowanie

Anonymous said...

Also, there isn't subzero temperatures in good places for ways to garden tools. It may glance a little scary, but it some sort of wonderful experience.

Here is my weblog; pozycjonowanie

Anonymous said...

Neglect the juicer, ice-cream maker, egg poacher, deep fryer additionally the
bread developer. This has a certain eroding effect on concrete over the time.



Also visit my web-site - pozycjonowanie

Anonymous said...

There are some agencies that handle with kids attached to
all ages. Rearranging your kid's table dresser will lessen usually the mess inside your prized house.

my page ... pozycjonowanie

Anonymous said...

Usually the things that your site tell the advisor is very important.
Likely through a divorce process doesn't have to be cost you heaps of money.

Feel free to surf to my webpage ... pozycjonowanie

Anonymous said...

In which mind the electric of personalization. This is why it is important to nominal comments continually.


Also visit my web site: pozycjonowanie

«Oldest ‹Older   201 – 229 of 229   Newer› Newest»