Welcome to the Xceed Community | Help
Community Search  
More Search Options

X-Y Scatter Chart Data Labels Subset

Sort Posts: Previous Next
  •  05-26-2011, 3:33 PM Post no. 30422

    X-Y Scatter Chart Data Labels Subset

    screen capture

     

     

     

     

     

     

     

     

     

     

     

     

     

     

     

     

     

     

    Can you tell me how the DataLabels.Subset() is supposed to work?

     If the image above works correctly... I have 50 data points of live data moving in the direction of the arrow.

    When setting my DataLabels to visible, the LAST data point gets the label and not the first.

    My code for enabling the Data Labels is pasted into the image.

    How do I need to do this in order to have the FIRST data point get the label?

  •  05-26-2011, 3:44 PM Post no. 30423 in reply to 30422

    Re: X-Y Scatter Chart Data Labels Subset

    This was emailed - the image didn't post.
  •  05-27-2011, 12:00 PM Post no. 30426 in reply to 30423

    Re: X-Y Scatter Chart Data Labels Subset

    Hi James, 

    The Subset contains the indexes in which labels will be displayed. 

    You can simply change the index on which you want the datalabel to be displayed. 

    You can find an example in the Char explorer samples, check the "Series Attributes" / "Data Labels" sample. Choose "Subset" from the combobox on the right under "mode" and click on "Show at min value" and "Show at max value" to see how the labels get added.

    the code behind was something like this:

        private void ShowAtMinValue_Click(object sender, System.EventArgs e)

        {

          m_Bar.DataLabels.Subset.AddIndex(m_Bar.Values.FindMinValue());    

          m_ChartControl.Refresh();

        }


        private void ShowAtMaxValue_Click(object sender, System.EventArgs e)

        {

          m_Bar.DataLabels.Subset.AddIndex(m_Bar.Values.FindMaxValue());

          m_ChartControl.Refresh();

        }

     


    Best Regards,

    Michel Dahdah
    Technical Support
    Xceed Software inc.
  •  05-27-2011, 12:21 PM Post no. 30427 in reply to 30426

    Re: X-Y Scatter Chart Data Labels Subset

    Looking at the example, I don't think your response is what I am trying to do.

    I don't care what the minimum or maximum values are. I want a data label on the first data point that gets displayed, regardless of the value. Right now, I am getting a data label on the last data point.

    On the example, if I select every and set the interval to the amount of data points, it gives the appearance I want. Is this going to be my solution?

     tks

    Jim Mahaffey

  •  05-27-2011, 12:31 PM Post no. 30428 in reply to 30427

    Re: X-Y Scatter Chart Data Labels Subset

    Yes, 

    I would guess it is. You need to set the correct index, and since zero is giving you the first point, then the count of the data points you have should do the opposite.

    If that doesn't solve your issue, we would need to see your sample application  to investigate in more detail. 


    Best Regards,

    Michel Dahdah
    Technical Support
    Xceed Software inc.
  •  05-27-2011, 4:35 PM Post no. 30433 in reply to 30428

    Re: X-Y Scatter Chart Data Labels Subset

    Using Subset, I pass the queue size -1. It now gives me the data label on the lead data point.

    Big Smile 

View as RSS news feed in XML
Contact | Site Map | Reviews | Legal Terms of Use | Trademarks | Privacy Statement Copyright 2011 Xceed Software Inc.