5 Replies Latest reply on Jul 13, 2006 7:00 AM by LaoD

    CFChart Stacked

      I've read most of the CFChart posts but cannot get this to work exactly how I want it to.

      What I need is for the chart to display TQ along the X axis and Counts along the Y axis. Then I need two values displayed as stacked bars for each TQ along the X axis. The first value is the InsideTQ, the next value is OutsideTQ. Both InsideTQ and OutsideTQ equal the total count of points for a TQ value.

      e.g TQ value 5 has a count of 60 InsideTQ points and 55 OutsideTQ points, so TQ value 5 has a total of 115 points.

      This part works pretty good. The problem is that I have muliple Originators for each TQ and for each InsideTQ and OutsideTQ. I want to display the TQ values along the X axis ( 1 to 15 ) but only display them once. In each TQ value I want to have the Originators with their In and Out values displayed as stacked bars.

      e.g. Originator Y, TQ 5, Inside 60, Outside 55 next show Originator Z, TQ 5, Inside 40, Outside 35.

      If it isn't asking too much, I would also always like for the InsideTQ to display green and the OutsideTQ to display red. When I try to force the colors I end up with the entire stacked bar the same color.

      What I usually end up with is the TQ going from 1 to 15 for the first Originator and then starting over at 1 for the next Originator.

      Here's my query and my chart. Thanks in advance for your help...

      BTW -- I'm using a <CFLOOP> then a <CFOUTPUT> instead of a <CFOUTPUT> with a GROUP because this code sits within a report which is already enclosed in <CFOUTPUT> tags.

        • 1. Re: CFChart Stacked
          MikerRoo Level 1
          Try the attached.

          • 2. Re: CFChart Stacked
            LaoD Level 1
            Hi MikeRoo,

            Thanks for the reply but I'm getting an error now. Attached is the error and line it is complaining about.

            Thanks again for your assistance, it is GREATLY appreciated.

            • 3. Re: CFChart Stacked
              LaoD Level 1
              Hi MikeRoo

              I figured out the problem noted in my previous post. The WHERE need single quoutes not double.

              But I am still getting all the Originators and the In and Out TQs stacked on top of each other instead of side-by-side.

              I modified the code as follows to change the stacked graph to default, this allows the Originators to display side-by-side but also the In or Out TQs also display side-by-side instead of stacked on top of each other. I removed the color specification I used because it made it difficult to see which Originator's In/Out TQs I was looking at.

              If you have any other ideas, I'm willing to try them...

              BTW -- I'm implementing a bunch of these graphs and keep coming up against the same type of problem when the data returned is more complex. Do you know of a good resource for learning CFCharts and how to manipulate complex data queries in them? I've gone through SEVERAL books and tutorials and I can recreate their examples, but they are too simple for most of the reporting I'm trying to graph.

              Again, thanks and thanks!

              • 4. Re: CFChart Stacked
                MikerRoo Level 1
                Unfortunately, the combination of stacked and clustered bars you want is beyond the capabilities of CFChart.

                CFChart can really only do basic charts. It runs a subset(!) of Webcharts3D and that engine is pretty limited.

                Look up webchart designer in these forums and in CF help. You'll find a tool that will show you CFchart's possibilities.

                Alas, I can't think of a good way, to display the information you have, that cfchart can do.

                We use ChartDirector ( http://www.advsofteng.com) for engineering and scientific charts. However, this does require C or java integration.

                As for books, your best bet is The Visual Display of Quantitative Information .
                • 5. Re: CFChart Stacked
                  LaoD Level 1
                  Thanks for the information MikeRoo. And THANKS for your help.