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

Custom Category Names

Expand Messages
  • vmlepore
    Hello, I have a line graph that has 180 data points (or 180 categories with an associated value). Everything is working great but I m stuck on one little
    Message 1 of 6 , Jul 13, 2011
    • 0 Attachment
      Hello,
      I have a line graph that has 180 data points (or 180 categories with an associated value).
      Everything is working great but I'm stuck on one little thing. Obviously, there is no way to display all 180 category names on the horizontal axis of the graph. So I try to create a custom categoryaxis and pass it just an array of values that I want to actually show on the axis. Let's say I pass the Category Axis 31 values. Now, the graph only plots or displays those 31 data points and ignores the rest! How do I limit the number of category labels but still plot all 180 data points? Thanks so much!
    • Josh Tynjala
      You cannot. The category axis can only display all categories or a subset that you specify. Do your categories have some sort of measurable meaning? I mean,
      Message 2 of 6 , Jul 13, 2011
      • 0 Attachment
        You cannot. The category axis can only display all categories or a subset that you specify. Do your categories have some sort of measurable meaning? I mean, are they date/time-based or numeric? If so, you can use one of the other axes. If not, then you'll probably need to create a custom axis type (or modify the category axis to do what you need).

        - Josh

        On Wed, Jul 13, 2011 at 5:06 AM, vmlepore <vmlepore@...> wrote:
         

        Hello,
        I have a line graph that has 180 data points (or 180 categories with an associated value).
        Everything is working great but I'm stuck on one little thing. Obviously, there is no way to display all 180 category names on the horizontal axis of the graph. So I try to create a custom categoryaxis and pass it just an array of values that I want to actually show on the axis. Let's say I pass the Category Axis 31 values. Now, the graph only plots or displays those 31 data points and ignores the rest! How do I limit the number of category labels but still plot all 180 data points? Thanks so much!


      • vmlepore
        Hi Josh, thanks for your response and thanks for the great components. They have been tremendously helpful for me! The categories are numeric and represent
        Message 3 of 6 , Jul 14, 2011
        • 0 Attachment
          Hi Josh, thanks for your response and thanks for the great components. They have been tremendously helpful for me!

          The categories are numeric and represent audio frequencies measured in Hz. The line series is plotting decibel levels (vertical axis) over Hz (horizontal axis). The vertical axis is fine because it's numeric and it's simply in increments of 6dB from -24dB to +12dB. The horizontal axis on the other hand, has 180 categories. If I understand you correctly, the line series will only plot the categories that are shown on the category axis, regardless of how large the dataset of the line series is (in this case 180 categories). I guess I'll try your suggestion of modifying the category axis. Thanks again for your help!

          --- In ydn-flash@yahoogroups.com, Josh Tynjala <joshtynjala@...> wrote:
          >
          > You cannot. The category axis can only display all categories or a subset
          > that you specify. Do your categories have some sort of measurable meaning? I
          > mean, are they date/time-based or numeric? If so, you can use one of the
          > other axes. If not, then you'll probably need to create a custom axis type
          > (or modify the category axis to do what you need).
          >
          > - Josh
          >
          > On Wed, Jul 13, 2011 at 5:06 AM, vmlepore <vmlepore@...> wrote:
          >
          > > **
          > >
          > >
          > > Hello,
          > > I have a line graph that has 180 data points (or 180 categories with an
          > > associated value).
          > > Everything is working great but I'm stuck on one little thing. Obviously,
          > > there is no way to display all 180 category names on the horizontal axis of
          > > the graph. So I try to create a custom categoryaxis and pass it just an
          > > array of values that I want to actually show on the axis. Let's say I pass
          > > the Category Axis 31 values. Now, the graph only plots or displays those 31
          > > data points and ignores the rest! How do I limit the number of category
          > > labels but still plot all 180 data points? Thanks so much!
          > >
          > >
          > >
          >
        • Josh Tynjala
          Considering that Hz is a numeric value, wouldn t it make sense to use a NumericAxis instead of a CategoryAxis? - Josh
          Message 4 of 6 , Jul 14, 2011
          • 0 Attachment
            Considering that Hz is a numeric value, wouldn't it make sense to use a NumericAxis instead of a CategoryAxis?

            - Josh

            On Thu, Jul 14, 2011 at 5:56 AM, vmlepore <vmlepore@...> wrote:
             

            Hi Josh, thanks for your response and thanks for the great components. They have been tremendously helpful for me!

            The categories are numeric and represent audio frequencies measured in Hz. The line series is plotting decibel levels (vertical axis) over Hz (horizontal axis). The vertical axis is fine because it's numeric and it's simply in increments of 6dB from -24dB to +12dB. The horizontal axis on the other hand, has 180 categories. If I understand you correctly, the line series will only plot the categories that are shown on the category axis, regardless of how large the dataset of the line series is (in this case 180 categories). I guess I'll try your suggestion of modifying the category axis. Thanks again for your help!


            --- In ydn-flash@yahoogroups.com, Josh Tynjala <joshtynjala@...> wrote:
            >
            > You cannot. The category axis can only display all categories or a subset
            > that you specify. Do your categories have some sort of measurable meaning? I
            > mean, are they date/time-based or numeric? If so, you can use one of the
            > other axes. If not, then you'll probably need to create a custom axis type
            > (or modify the category axis to do what you need).
            >
            > - Josh
            >
            > On Wed, Jul 13, 2011 at 5:06 AM, vmlepore <vmlepore@...> wrote:
            >
            > > **
            > >
            > >
            > > Hello,
            > > I have a line graph that has 180 data points (or 180 categories with an
            > > associated value).
            > > Everything is working great but I'm stuck on one little thing. Obviously,
            > > there is no way to display all 180 category names on the horizontal axis of
            > > the graph. So I try to create a custom categoryaxis and pass it just an
            > > array of values that I want to actually show on the axis. Let's say I pass
            > > the Category Axis 31 values. Now, the graph only plots or displays those 31
            > > data points and ignores the rest! How do I limit the number of category
            > > labels but still plot all 180 data points? Thanks so much!
            > >
            > >
            > >
            >


          • vmlepore
            Yeah I agree Josh, I honestly just couldn t figure out how to make it work with the numeric axis. My understanding (which could be completely wrong) of the
            Message 5 of 6 , Jul 21, 2011
            • 0 Attachment
              Yeah I agree Josh, I honestly just couldn't figure out how to make it work with the numeric axis. My understanding (which could be completely wrong) of the numeric axis is that you specify a minimum and maximum value to be shown on the axis, and an increment (majorunit) that the axis increases at each tick. Due to the logarithmic nature of the graph, I just couldn't figure out how to set the increment so I got the right values, and the right number of values. For example, here are the frequencies in Hz I need displayed on the horizontal axis....

              20, 25, 31.5, 40, 50, 63, 80, 100, 125, 160, 200, 250, 315, 400, 500, 630, 800, 1000, 1250, 1600, 2000, 2500, 3150, 4000, 5000, 6300, 8000, 10000, 12500, 16000, 20000

              So there are 31 total frequencies that I need displayed, and those should be evenly spaced across the horizontal axis. The data spans that entire frequency range, but like I said earlier, there are 180 data points, and I need all of that data drawn by the line series. Any ideas? Thanks again for the help!

              --- In ydn-flash@yahoogroups.com, Josh Tynjala <joshtynjala@...> wrote:
              >
              > Considering that Hz is a numeric value, wouldn't it make sense to use a
              > NumericAxis instead of a CategoryAxis?
              >
              > - Josh
              >
              > On Thu, Jul 14, 2011 at 5:56 AM, vmlepore <vmlepore@...> wrote:
              >
              > > **
              > >
              > >
              > > Hi Josh, thanks for your response and thanks for the great components. They
              > > have been tremendously helpful for me!
              > >
              > > The categories are numeric and represent audio frequencies measured in Hz.
              > > The line series is plotting decibel levels (vertical axis) over Hz
              > > (horizontal axis). The vertical axis is fine because it's numeric and it's
              > > simply in increments of 6dB from -24dB to +12dB. The horizontal axis on the
              > > other hand, has 180 categories. If I understand you correctly, the line
              > > series will only plot the categories that are shown on the category axis,
              > > regardless of how large the dataset of the line series is (in this case 180
              > > categories). I guess I'll try your suggestion of modifying the category
              > > axis. Thanks again for your help!
              > >
              > > --- In ydn-flash@yahoogroups.com, Josh Tynjala <joshtynjala@> wrote:
              > > >
              > > > You cannot. The category axis can only display all categories or a subset
              > > > that you specify. Do your categories have some sort of measurable
              > > meaning? I
              > > > mean, are they date/time-based or numeric? If so, you can use one of the
              > > > other axes. If not, then you'll probably need to create a custom axis
              > > type
              > > > (or modify the category axis to do what you need).
              > > >
              > > > - Josh
              > > >
              > > > On Wed, Jul 13, 2011 at 5:06 AM, vmlepore <vmlepore@> wrote:
              > > >
              > > > > **
              > > > >
              > > > >
              > > > > Hello,
              > > > > I have a line graph that has 180 data points (or 180 categories with an
              > > > > associated value).
              > > > > Everything is working great but I'm stuck on one little thing.
              > > Obviously,
              > > > > there is no way to display all 180 category names on the horizontal
              > > axis of
              > > > > the graph. So I try to create a custom categoryaxis and pass it just an
              > > > > array of values that I want to actually show on the axis. Let's say I
              > > pass
              > > > > the Category Axis 31 values. Now, the graph only plots or displays
              > > those 31
              > > > > data points and ignores the rest! How do I limit the number of category
              > > > > labels but still plot all 180 data points? Thanks so much!
              > > > >
              > > > >
              > > > >
              > > >
              > >
              > >
              > >
              >
            • Josh Tynjala
              Okay. In this case, I think you re probably right to look at the CategoryAxis. Here are some suggestions based on a quick look in the docs: 1) Take a look at
              Message 6 of 6 , Jul 21, 2011
              • 0 Attachment
                Okay. In this case, I think you're probably right to look at the CategoryAxis. Here are some suggestions based on a quick look in the docs:

                1) Take a look at the calculateCategoryCount property on CategoryAxis. It appears that, if this this set to true, it may hide some of the category labels. I'm not sure, though. I don't remember that particular property. It may have been added after I stopped working at Yahoo!.

                2) Alternatively, you could implement a labelFunction on the CategoryAxis. Simply return an empty string for some of the labels.

                - Josh

                On Thu, Jul 21, 2011 at 6:08 AM, vmlepore <vmlepore@...> wrote:
                 

                Yeah I agree Josh, I honestly just couldn't figure out how to make it work with the numeric axis. My understanding (which could be completely wrong) of the numeric axis is that you specify a minimum and maximum value to be shown on the axis, and an increment (majorunit) that the axis increases at each tick. Due to the logarithmic nature of the graph, I just couldn't figure out how to set the increment so I got the right values, and the right number of values. For example, here are the frequencies in Hz I need displayed on the horizontal axis....

                20, 25, 31.5, 40, 50, 63, 80, 100, 125, 160, 200, 250, 315, 400, 500, 630, 800, 1000, 1250, 1600, 2000, 2500, 3150, 4000, 5000, 6300, 8000, 10000, 12500, 16000, 20000

                So there are 31 total frequencies that I need displayed, and those should be evenly spaced across the horizontal axis. The data spans that entire frequency range, but like I said earlier, there are 180 data points, and I need all of that data drawn by the line series. Any ideas? Thanks again for the help!



                --- In ydn-flash@yahoogroups.com, Josh Tynjala <joshtynjala@...> wrote:
                >
                > Considering that Hz is a numeric value, wouldn't it make sense to use a
                > NumericAxis instead of a CategoryAxis?
                >
                > - Josh
                >
                > On Thu, Jul 14, 2011 at 5:56 AM, vmlepore <vmlepore@...> wrote:
                >
                > > **
                > >
                > >
                > > Hi Josh, thanks for your response and thanks for the great components. They
                > > have been tremendously helpful for me!
                > >
                > > The categories are numeric and represent audio frequencies measured in Hz.
                > > The line series is plotting decibel levels (vertical axis) over Hz
                > > (horizontal axis). The vertical axis is fine because it's numeric and it's
                > > simply in increments of 6dB from -24dB to +12dB. The horizontal axis on the
                > > other hand, has 180 categories. If I understand you correctly, the line
                > > series will only plot the categories that are shown on the category axis,
                > > regardless of how large the dataset of the line series is (in this case 180
                > > categories). I guess I'll try your suggestion of modifying the category
                > > axis. Thanks again for your help!
                > >
                > > --- In ydn-flash@yahoogroups.com, Josh Tynjala <joshtynjala@> wrote:
                > > >
                > > > You cannot. The category axis can only display all categories or a subset
                > > > that you specify. Do your categories have some sort of measurable
                > > meaning? I
                > > > mean, are they date/time-based or numeric? If so, you can use one of the
                > > > other axes. If not, then you'll probably need to create a custom axis
                > > type
                > > > (or modify the category axis to do what you need).
                > > >
                > > > - Josh
                > > >
                > > > On Wed, Jul 13, 2011 at 5:06 AM, vmlepore <vmlepore@> wrote:
                > > >
                > > > > **
                > > > >
                > > > >
                > > > > Hello,
                > > > > I have a line graph that has 180 data points (or 180 categories with an
                > > > > associated value).
                > > > > Everything is working great but I'm stuck on one little thing.
                > > Obviously,
                > > > > there is no way to display all 180 category names on the horizontal
                > > axis of
                > > > > the graph. So I try to create a custom categoryaxis and pass it just an
                > > > > array of values that I want to actually show on the axis. Let's say I
                > > pass
                > > > > the Category Axis 31 values. Now, the graph only plots or displays
                > > those 31
                > > > > data points and ignores the rest! How do I limit the number of category
                > > > > labels but still plot all 180 data points? Thanks so much!
                > > > >
                > > > >
                > > > >
                > > >
                > >
                > >
                > >
                >


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