Loading ...
Sorry, an error occurred while loading the content.

Stacked Bar Charts?

Expand Messages
  • Chris Green
    Good day, Is it possible to create a stacked series definition for the BarCharts? I ve been very pleased with this component thus far. I can live without it
    Message 1 of 5 , Jan 2, 2008
    View Source
    • 0 Attachment
      Good day,

      Is it possible to create a "stacked" series definition for the
      BarCharts? I've been very pleased with this component thus far. I can
      live without it but it seems like a logical next step.

      Thanks,
      Chris
      --
      Chris Green <greencm@...>
    • Josh Tynjala
      Stacking is currently not supported. I will make sure there s a feature request for it. Josh Tynjala Yahoo! Flash Platform ________________________________
      Message 2 of 5 , Jan 2, 2008
      View Source
      • 0 Attachment

        Stacking is currently not supported. I will make sure there’s a feature request for it.

         

        Josh Tynjala

        Yahoo! Flash Platform

         


        From: ydn-javascript@yahoogroups.com [mailto: ydn-javascript@yahoogroups.com ] On Behalf Of Chris Green
        Sent: Wednesday, January 02, 2008 12:24 PM
        To: ydn-javascript@yahoogroups.com
        Subject: [ydn-javascript] Stacked Bar Charts?

         

        Good day,

        Is it possible to create a "stacked" series definition for the
        BarCharts? I've been very pleased with this component thus far. I can
        live without it but it seems like a logical next step.

        Thanks,
        Chris
        --
        Chris Green <greencm@gmail. com>

      • Hollywood
        The connection class has a setForm method, however it has an issue with multiple checkboxes with the same name. For checkboxes the line the case statement
        Message 3 of 5 , Jan 3, 2008
        View Source
        • 0 Attachment
          The connection class has a setForm method, however it has an issue with multiple checkboxes with the same name.
           
          For checkboxes the line the case statement reads:
           
          case 'checkbox':
                if(oElement.checked){
                 this._sFormData += encodeURIComponent(oName) + '=' + encodeURIComponent(oValue) + '&';
                }
                break;
           
          but this only sends in the checkboxes that are checked and you lose information because you don't know which checkboxes are checked.  If you have five checkboxes with the name of "MyCheckbox" (or say with PHP, "MyCheckbox[]") and the 1st, 2nd and 5th choices are marked, you would get three "MyCheckbox=1" values in the query.  Now you've lost any notion of what values belong to what checkbox.  The better way would be:
           
          case 'checkbox':
                this._sFormData += encodeURIComponent(oName) + '=' + encodeURIComponent(oElement.checked) ? 1 : 0) + '&';
                break;
           
          Radio button should have its own case statement as it currently is:
           
          case 'radio':
               if(oElement.checked){
                 this._sFormData += encodeURIComponent(oName) + '=' + encodeURIComponent(oValue) + '&';
                }
                break;
           
          Of course when radio buttons are named the same, only one can be selected so the value of that radio button is just passed along for the checked radio button.
           
          Additionally before the switch statement the type, if defined, should be set to lower case string, i.e.
           
          var type = oElement.type;
          if (type)
              type = oElement.type.toLowerCase();
          switch(type)
          {
          ....
          }
           
          A clean copy of this function can be found at http://www.thzero.com/programming/yui/connection_setform.js
           
        • tssha
          ... with multiple checkboxes with the same name. ... encodeURIComponent(oValue) + & ; ... information because you don t know which checkboxes are checked. If
          Message 4 of 5 , Jan 3, 2008
          View Source
          • 0 Attachment
            --- In ydn-javascript@yahoogroups.com, "Hollywood" <impulsegto@...> wrote:
            >
            > The connection class has a setForm method, however it has an issue
            with multiple checkboxes with the same name.
            >
            > For checkboxes the line the case statement reads:
            >
            > case 'checkbox':
            > if(oElement.checked){
            > this._sFormData += encodeURIComponent(oName) + '=' +
            encodeURIComponent(oValue) + '&';
            > }
            > break;
            >
            > but this only sends in the checkboxes that are checked and you lose
            information because you don't know which checkboxes are checked. If
            you have five checkboxes with the name of "MyCheckbox" (or say with
            PHP, "MyCheckbox[]") and the 1st, 2nd and 5th choices are marked, you
            would get three "MyCheckbox=1" values in the query. Now you've lost
            any notion of what values belong to what checkbox. The better way
            would be:

            With five checkboxes named MyCheckBox, the following result is
            returned via PHP's print_r when the first, second, and fifth
            checkboxes are enabled:

            [MyCheckBox] => Array ( [0] => selection1 [1] => selection2 [4] =>
            selection4 )

            If this is not the result you are seeing, please provide me with a
            functional example where the results differ and I will investigate
            further.

            Regards,
            Thomas
          • jercle
            It will be a good idea to support stacked chart !! thanks
            Message 5 of 5 , Jun 17, 2008
            View Source
            • 0 Attachment
              It will be a good idea to support stacked chart !!
              thanks

              --- In ydn-javascript@yahoogroups.com, "Josh Tynjala" <jtynjala@...>
              wrote:
              >
              > Stacking is currently not supported. I will make sure there's a feature
              > request for it.
              >
              >
              >
              > Josh Tynjala
              >
              > Yahoo! Flash Platform
              >
              >
              >
              > ________________________________
              >
              > From: ydn-javascript@yahoogroups.com
              > [mailto:ydn-javascript@yahoogroups.com] On Behalf Of Chris Green
              > Sent: Wednesday, January 02, 2008 12:24 PM
              > To: ydn-javascript@yahoogroups.com
              > Subject: [ydn-javascript] Stacked Bar Charts?
              >
              >
              >
              > Good day,
              >
              > Is it possible to create a "stacked" series definition for the
              > BarCharts? I've been very pleased with this component thus far. I can
              > live without it but it seems like a logical next step.
              >
              > Thanks,
              > Chris
              > --
              > Chris Green <greencm@... <mailto:greencm%40gmail.com> >
              >
            Your message has been successfully submitted and would be delivered to recipients shortly.