Loading ...
Sorry, an error occurred while loading the content.
Skip to search.
 

Bar Charts - Is is possible to set style?

Expand Messages
  • connertp65
    Adding a style attribute (even an empty one) to my series definition breaks the chart. Chart displays nothing but an empty grid, making it appear that the
    Message 1 of 5 , Mar 31, 2008
      Adding a style attribute (even an empty one) to my series definition
      breaks the chart. Chart displays nothing but an empty grid, making it
      appear that the series was not defined correctly. I have cut and
      pasted the example from the YUI site on skinning a chart (which is a
      column chart) and it doesn't work either. I'm using YUI version 2.5.0
      and the SWFURL is
      http://yui.yahooapis.com/2.4.1/build/charts/assets/charts.swf?_yuiversion=2.5.0
      The only examples I've seen are line charts and column charts. Is it
      not possible to skin a bar chart? Thanks,

      Tim
    • Josh Tynjala
      Styling a BarChart works for me with version 2.5.0. Your SWFURL should look like the following: http://yui.yahooapis.com/2.5.0/build/charts/assets/charts.swf
      Message 2 of 5 , Mar 31, 2008

        Styling a BarChart works for me with version 2.5.0.

        Your SWFURL should look like the following:
        http://yui.yahooapis.com/2.5.0/build/charts/assets/charts.swf

        Notice that the URL you posted specified 2.4.1, which is probably incompatible with the 2.5.0 JavaScript files.

        Josh Tynjala
        Yahoo!

         


        From: ydn-javascript@yahoogroups.com [mailto: ydn-javascript@yahoogroups.com ] On Behalf Of connertp65
        Sent: Monday, March 31, 2008 10:53 AM
        To: ydn-javascript@yahoogroups.com
        Subject: [ydn-javascript] Bar Charts - Is is possible to set style?

         

        Adding a style attribute (even an empty one) to my series definition
        breaks the chart. Chart displays nothing but an empty grid, making it
        appear that the series was not defined correctly. I have cut and
        pasted the example from the YUI site on skinning a chart (which is a
        column chart) and it doesn't work either. I'm using YUI version 2.5.0
        and the SWFURL is
        http://yui.yahooapi s.com/2.4. 1/build/charts/ assets/charts. swf?_yuiversion= 2.5.0
        The only examples I've seen are line charts and column charts. Is it
        not possible to skin a bar chart? Thanks,

        Tim

      • connertp65
        Thanks for the reply. I have made sure that my SWFURL and javascript files are all 2.5.0. For good measure I made sure I was loading the javascript files in
        Message 3 of 5 , Mar 31, 2008
          Thanks for the reply. I have made sure that my SWFURL and javascript
          files are all 2.5.0. For good measure I made sure I was loading the
          javascript files in the order specified on the Charts page of the
          Yahoo Developer's site. I'm still seeing the same behavior: a chart
          that is otherwise working fine renders nothing as soon as I add a
          style attribute to the series definition. Below is an example of a
          broken version:

          var salesSeries =
          [
          {
          xField: "SalesYTD",
          displayName: "Sales YTD",
          style: {color: 0x00ff00}
          },
          {
          xField: "SalesLY",
          displayName: "Sales Last Year",
          style: {color: 0x00ff00}
          }
          ];

          I get the same result if the style attribute is empty (style: {}).
          Can you give me an example of how this should look for a bar chart?
          Do I have to specify more values than just color? Thanks again for
          your help.

          Tim
        • Josh Tynjala
          The code you posted looks 100% correct. There is nothing different about BarChart when specifying series styles. Can you post the URL of a page that
          Message 4 of 5 , Mar 31, 2008

            The code you posted looks 100% correct. There is nothing different about BarChart when specifying series styles. Can you post the URL of a page that demonstrates the problem?

            Josh Tynjala
            Yahoo!

             


            From: ydn-javascript@yahoogroups.com [mailto: ydn-javascript@yahoogroups.com ] On Behalf Of connertp65
            Sent: Monday, March 31, 2008 1:58 PM
            To: ydn-javascript@yahoogroups.com
            Subject: [ydn-javascript] Re: Bar Charts - Is is possible to set style?

             

            Thanks for the reply. I have made sure that my SWFURL and javascript
            files are all 2.5.0. For good measure I made sure I was loading the
            javascript files in the order specified on the Charts page of the
            Yahoo Developer's site. I'm still seeing the same behavior: a chart
            that is otherwise working fine renders nothing as soon as I add a
            style attribute to the series definition. Below is an example of a
            broken version:

            var salesSeries =
            [
            {
            xField: "SalesYTD",
            displayName: "Sales YTD",
            style: {color: 0x00ff00}
            },
            {
            xField: "SalesLY",
            displayName: "Sales Last Year",
            style: {color: 0x00ff00}
            }
            ];

            I get the same result if the style attribute is empty (style: {}).
            Can you give me an example of how this should look for a bar chart?
            Do I have to specify more values than just color? Thanks again for
            your help.

            Tim

          • tntnashtm123
            ... Hi Tim Did you resolve the issue ? I have the same problem with line chart since 2.5.0 - if I comment out the style code it works fine. thanks TMN
            Message 5 of 5 , Apr 10, 2008
              --- In ydn-javascript@yahoogroups.com, "Josh Tynjala" <jtynjala@...>
              wrote:
              >
              > The code you posted looks 100% correct. There is nothing different about
              > BarChart when specifying series styles. Can you post the URL of a page
              > that demonstrates the problem?
              >
              > Josh Tynjala
              > Yahoo!
              >
              >
              >
              > ________________________________
              >
              > From: ydn-javascript@yahoogroups.com
              > [mailto:ydn-javascript@yahoogroups.com] On Behalf Of connertp65
              > Sent: Monday, March 31, 2008 1:58 PM
              > To: ydn-javascript@yahoogroups.com
              > Subject: [ydn-javascript] Re: Bar Charts - Is is possible to set style?
              >
              >
              >
              > Thanks for the reply. I have made sure that my SWFURL and javascript
              > files are all 2.5.0. For good measure I made sure I was loading the
              > javascript files in the order specified on the Charts page of the
              > Yahoo Developer's site. I'm still seeing the same behavior: a chart
              > that is otherwise working fine renders nothing as soon as I add a
              > style attribute to the series definition. Below is an example of a
              > broken version:
              >
              > var salesSeries =
              > [
              > {
              > xField: "SalesYTD",
              > displayName: "Sales YTD",
              > style: {color: 0x00ff00}
              > },
              > {
              > xField: "SalesLY",
              > displayName: "Sales Last Year",
              > style: {color: 0x00ff00}
              > }
              > ];
              >
              > I get the same result if the style attribute is empty (style: {}).
              > Can you give me an example of how this should look for a bar chart?
              > Do I have to specify more values than just color? Thanks again for
              > your help.
              >
              > Tim
              >

              Hi Tim

              Did you resolve the issue ?

              I have the same problem with line chart since 2.5.0 - if I comment
              out the style code it works fine.

              thanks
              TMN
            Your message has been successfully submitted and would be delivered to recipients shortly.