Professional Web Applications Themes

CFCHART & VERTICAL LABELS - Macromedia ColdFusion

I love ColdFusion, and have been using it, literally, for years. And I think many aspects of the new CFMX7 are great. HOWEVER, that being said, I think that there are many aspects that simply don't work like they should - including things that worked fine in CFMX6. We have continued...

  1. #1

    Default CFCHART & VERTICAL LABELS

    I love ColdFusion, and have been using it, literally, for years. And I think
    many aspects of the new CFMX7 are great. HOWEVER, that being said, I think
    that there are many aspects that simply don't work like they should - including
    things that worked fine in CFMX6.

    We have a cfchart (many of them, in fact) with two chart series, BOTH line
    charts. The chart has 40-50 elements. In CFMX6, it wasn't a big deal, the
    labels just rotated so that they were displayed vertically. Now, however, they
    only display one out of every six or seven labels, which is ridiculous - who on
    earth came up with THAT solution??

    I have played with the webchart3d component, and actually like it. However,
    it doesn't make my problem any better - in fact, it makes it worse. Now, it
    does display all of the X axis labels..........I think..........they just write
    over each other, making it impossible to read ANY of the labels.

    All I need to know is this:
    Can I have the labels rotate so they are displayed vertically, LIKE THE
    FUNCTIONALITY THAT ALREADY WORKED IN THE PREVIOUS VERSION OF THE APPLICATION
    SERVER?
    When will the scaleFrom/scaleTO params work for line charts. I saw Mr.
    Forta's reponse - we all know who he is, and what a fantastic developer he is,
    but he (intentionally or unintentionally, I don't know) skipped over the whole
    issue. Yes, the scale works fine for bar charts, Ben. Now try it with a line
    chart.

    The scales would be very nice, but for us, is a bonus at this point. Without
    the vertical X axis labels, however, the CFCHART tag is completely useless, at
    least for us, and we will need to, at best, find another

    nbhealthpro Guest

  2. #2

    Default CFCHART & VERTICAL LABELS

    I love ColdFusion, and have been using it, literally, for years. And I think
    many aspects of the new CFMX7 are great. HOWEVER, that being said, I think
    that there are many aspects that simply don't work like they should - including
    things that worked fine in CFMX6.

    We have a cfchart (many of them, in fact) with two chart series, BOTH line
    charts. The chart has 40-50 elements. In CFMX6, it wasn't a big deal, the
    labels just rotated so that they were displayed vertically. Now, however, they
    only display one out of every six or seven labels, which is ridiculous - who on
    earth came up with THAT solution??

    I have played with the webchart3d component, and actually like it. However,
    it doesn't make my problem any better - in fact, it makes it worse. Now, it
    does display all of the X axis labels..........I think..........they just write
    over each other, making it impossible to read ANY of the labels.

    All I need to know is this:
    Can I have the labels rotate so they are displayed vertically, LIKE THE
    FUNCTIONALITY THAT ALREADY WORKED IN THE PREVIOUS VERSION OF THE APPLICATION
    SERVER?
    When will the scaleFrom/scaleTO params work for line charts. I saw Mr.
    Forta's reponse - we all know who he is, and what a fantastic developer he is,
    but he (intentionally or unintentionally, I don't know) skipped over the whole
    issue. Yes, the scale works fine for bar charts, Ben. Now try it with a line
    chart.

    The scales would be very nice, but for us, is a bonus at this point. Without
    the vertical X axis labels, however, the CFCHART tag is completely useless, at
    least for us, and we will need to, at best, find another charting component, at
    WORST we will need to rollback to CFMX6, and advise all of our clients to do
    the same.

    Has anyone found an answer for ANY of the problems that have presented
    themselves in CFMX7?

    nbhealthpro Guest

  3. #3

    Default Re: CFCHART & VERTICAL LABELS

    I have spent all day try to fix what was working great in CF6.1. I've been
    using webchart3d to overcome the x-axis problem You can create a custom chart
    with x-lables slanted and check the hide overlapped option. Scale to/from is
    corrected when using webchart3d, at least for me. I was going to upgrade our
    production server last weekend, but this charting issue is holding us back.

    soonersak Guest

  4. #4

    Default Re: CFCHART & VERTICAL LABELS

    It is a HUGE issue, and I am simply flabbergasted that the powers-that-be at MacroMedia couldn't forsee that this was going to irritate a LOT of their core-customers/developers.
    nbhealthpro Guest

  5. #5

    Default Re: CFCHART & VERTICAL LABELS

    Hi guys

    We should be taking out a technote around next week to fix these problems.
    In the meanwhile, soonersak and nbhealthpro can you please post some code to
    help us te the problem?

    Thanks
    Prayank

    prayank Guest

  6. #6

    Default Re: CFCHART & VERTICAL LABELS

    can you post code for this to repro?

    Thanks
    Prayank

    prayank Guest

  7. #7

    Default Re: CFCHART & VERTICAL LABELS

    Thanks for looking into it, guys. Here's my code: I have four these charts on
    each page(worked great in CFMX6), thus I can't chage the height/width.
    <cfchart format='flash' chartheight='200' chartwidth='475'
    seriesplacement='default' showlegend='no' markersize='2'> <cfloop
    query='vspss'> <cfchartseries type='line'
    seriesLabel=#dateformat(we,'mm/dd')# seriesColor='RED'> <cfchartdata
    item=#dateformat(we,'mm/dd')# value='#goal#' > </cfchartseries>
    </cfloop> <cfloop query='vspss'> <cfchartseries type='bar'
    seriesLabel=#dateformat(we,'mm/dd')# seriesColor='#ssgrade(goal,ss)#'>
    <cfchartdata item=#dateformat(we,'mm/dd')# value='#ss#' >
    </cfchartseries> </cfloop> </cfchart>

    soonersak Guest

  8. #8

    Default Re: CFCHART & VERTICAL LABELS

    Hi guys

    Sorry for the trouble, but this is a change in behaviour. I'm not sure if the
    doentation mentions this. But we will definitely mention this in the
    technote we are going to bring out.

    Meanwhile, if you want the labels to go vertical. You can do the following:

    1. Goto <cfinstall>\charting\styles.
    2. Open default.xml
    3. Change the following line from:
    .............
    <xAxis>
    <labelStyle isHideOverlapped="true" orientation="Horizontal"/>
    <titleStyle font="Arial-12-bold" isMultiline="false"/>
    </xAxis>
    ..............

    to :
    <xAxis>
    <labelStyle isHideOverlapped="true" orientation="Vertical"/>
    <titleStyle font="Arial-12-bold" isMultiline="false"/>
    </xAxis>
    4. Save the file.
    5. Run your .cfm

    This should do it.

    Prayank
    CF dev team

    prayank Guest

  9. #9

    Default Re: CFCHART & VERTICAL LABELS

    prayank,

    Will there be a fix for lables not showing in CFMX7 vs CFMX6? Also, my co-worker is having issues with the legends not displaying correctly. I will post her code here.
    soonersak Guest

  10. #10

    Default Re: CFCHART & VERTICAL LABELS

    Hi soonersak

    Regarding change of labels.

    This is not a bug, it is a "change of behaviour". This is a change in default
    configuration, for which I have indicated to you in my previous post how you
    can get back the old functionality.

    Regarding the errors you coworker is facing. Please post the code and the
    problem she is facing. I would like to help as much as I can.

    Regards
    Prayank

    prayank Guest

  11. #11

    Default Re: CFCHART & VERTICAL LABELS

    I have been scoping about trying to get my existing charts to render properly.
    I used the webcharts-3d tool to change the behavior by modifying the
    <cfroot>\charting\gallery\3-bar-3d\cart-a.wcp model. I cannot figure out how to
    get ColdFusion to recognize the changes.

    I like to change the look and feel of different charts for different
    presentations. Using the method here of changing the default.xml style is a
    server-wide change. I would like more control from the attributes of the
    <cfchart> tag in regards to control the x-axis label formatting.

    Question: If I generate a xml file and store it in the <cfroot>\charting\style
    directory and use the style attribute in the <cfchart> tag to point to the
    file, can I still use the other attributes to control height, width, scalefrom,
    scaleto, etc?

    If not, can xAxisOrientation, xAxisMultiLine, and xAxisOverlapped attributes
    be created?

    I am a die-hard ColdFusion fan and like the changes you are making with MX7,
    but charts are not as impressive if you cannot fully control them on a page by
    page basis.

    rscrash Guest

  12. #12

    Default Re: CFCHART & VERTICAL LABELS

    Well, I decided to play a round a little bit and I was able to add the style
    attribute to the <cfchart> tag. It appears that any attribute value passed from
    the tag will supercede the xml based style. I was able to generate a xml file
    for each type of chart that I am outputting and point the style to the specific
    file in a sub-directory under each website that is running. This gives me full
    control of the look and feel and minimizes the total amount of code needed on a
    reuse for a particular graph type. I here is an example of the <cfchart> code:



    I have also attached my chartStyle.xml file. Hopefully this will help others
    out.

    <cfchart format="flash"
    style="chartStyle.xml"
    chartheight="450"
    chartwidth="700"
    scalefrom="0"
    scaleto="200"
    showxgridlines="no"
    showygridlines="yes"
    gridlines="11"
    databackgroundcolor="#lightcolor#"
    showborder="no"
    font="Arial"
    fontsize="9"
    xaxistitle="VENDORS"
    yaxistitle="SITES"
    sortxaxis="yes"
    xoffset="0.01"
    yoffset="0.03"
    showlegend="yes"
    tipstyle="MouseOver"
    tipbgcolor="white"
    url="results.cfm?vendor=$itemlabel$"
    backgroundcolor="#lightcolor#">

    <cfchartseries
    type="bar"
    query="s_count"
    itemcolumn="vendorname"
    valuecolumn="s_count"
    seriescolor="#darkcolor#"
    paintstyle="shade">
    </cfchart>


    <!-------chartStyle.xml------>

    <?xml version="1.0" encoding="UTF-8"?>
    <frameChart is3D="true">
    <frame xDepth="3" yDepth="3" outline="#333333" lightColor="white"
    leftAxisPlacement="Front" rightAxisPlacement="Front" stripColor="#CCCCCC"/>
    <xAxis>
    <labelStyle isMultiline="False" isHideOverlapped="False"
    orientation="Slanted"/>
    <titleStyle font="Arial-12-bold" isMultiline="false"/>
    </xAxis>
    <yAxis scaleMin="0">
    <titleStyle font="Arial-12-bold"/>
    <dateTimeStyle majorUnit="Year" minorUnit="Month"/>
    <labelFormat style="Pattern" pattern="#,##0.########"/>
    </yAxis>
    <yAxis2>
    <titleStyle font="Arial-12-bold"/>
    </yAxis2>
    <topYAxis>
    <titleStyle font="Arial-12-bold"/>
    </topYAxis>
    <topYAxis2>
    <titleStyle font="Arial-12-bold"/>
    </topYAxis2>
    <dataLabels foreground="black"/>
    <legend isVisible="false" >
    <decoration style="None"/>
    </legend>
    <elements action="" shape="Area" drawOutline="false">
    <morph morph="None"/>
    <series index="0">
    <paint color="#E48701"/>
    </series>
    <series index="1">
    <paint color="#A5BC4E"/>
    </series>
    <series index="2">
    <paint color="#1B95D9"/>
    </series>
    <series index="3">
    <paint color="#CACA9E"/>
    </series>
    <series index="4">
    <paint color="#6693B0"/>
    </series>
    <series index="5">
    <paint color="#F05E27"/>
    </series>
    <series index="6">
    <paint color="#86D1E4"/>
    </series>
    <series index="7">
    <paint color="#E4F9A0"/>
    </series>
    <series index="8">
    <paint color="#FFD512"/>
    </series>
    <series index="9">
    <paint color="#75B000"/>
    </series>
    <series index="10">
    <paint color="#0662B0"/>
    </series>
    <series index="11">
    <paint color="#EDE8C6"/>
    </series>
    <series index="12">
    <paint color="#CC3300"/>
    </series>
    <series index="13">
    <paint color="#D1DFE7"/>
    </series>
    <series index="14">
    <paint color="#52D4CA"/>
    </series>
    <series index="15">
    <paint color="#C5E05D"/>
    </series>
    <series index="16">
    <paint color="#E7C174"/>
    </series>
    <series index="17">
    <paint color="#FFF797"/>
    </series>
    <series index="18">
    <paint color="#C5F68F"/>
    </series>
    <series index="19">
    <paint color="#BDF1E6"/>
    </series>
    <series index="20">
    <paint color="#9E987D"/>
    </series>
    <series index="21">
    <paint color="#EB988D"/>
    </series>
    <series index="22">
    <paint color="#91C9E5"/>
    </series>
    <series index="23">
    <paint color="#93DC4A"/>
    </series>
    <series index="24">
    <paint color="#FFB900"/>
    </series>
    <series index="25">
    <paint color="#9EBBCD"/>
    </series>
    <series index="26">
    <paint color="#009797"/>
    </series>
    <series index="27">
    <paint color="#0DB2C2"/>
    </series>
    </elements>
    <popup background="#C8FFFFFF" foreground="#333333"/>
    <paint paint="Plain"/>
    <insets left="5" top="5" right="5" bottom="5"/>
    </frameChart>

    rscrash Guest

  13. #13

    Default Re: CFCHART & VERTICAL LABELS

    nbhealthpro ,

    I am facing same problem, Have you found out any workaround for the same.

    Thanks,
    Suresh.
    sanksuri Guest

  14. #14

    Default Re: CFCHART & VERTICAL LABELS

    nbhealthpro ,

    I am facing same problem, Have you found out any workaround for the same.

    Thanks,
    Suresh.
    sanksuri Guest

  15. #15

    Default Re: CFCHART & VERTICAL LABELS

    Based on this link, all I did was copy the default.xml file in the <cfinstall>\charting\styles folder\ to VerticalX.xml

    and then in VerticalX.xml changed the orientation="Vertical" as described above.

    Then in my cfchart, simply added style="VerticalX"

    Works brilliantly.
    Phil Guest

Similar Threads

  1. cfchart labels
    By rmorgan in forum Macromedia ColdFusion
    Replies: 7
    Last Post: October 12th, 07:22 AM
  2. Help w/ CFChart and labels
    By srushing in forum Coldfusion - Advanced Techniques
    Replies: 6
    Last Post: June 28th, 07:26 PM
  3. CFChart - Changing Item Label Text to Vertical fromHorizontal
    By Andrew Lueck in forum Coldfusion Flash Integration
    Replies: 1
    Last Post: June 28th, 06:48 PM
  4. cfchart rotate x axis labels
    By mynewnameforthisforum in forum Coldfusion - Advanced Techniques
    Replies: 1
    Last Post: May 25th, 07:43 PM
  5. CFCHART: Horizontal bar labels are squished in 7
    By dsbrady_98 in forum Macromedia ColdFusion
    Replies: 5
    Last Post: April 28th, 07:50 PM

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139