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

How to automatically use next default color for new Series?

Sort Posts: Previous Next
  •  05-15-2012, 4:03 PM Post no. 32108

    How to automatically use next default color for new Series?

    Using a manhattan chart, I am adding several BarSeries.

    The axis are count (vertical), hour of day (0-23) X, and a text name Z.

    Is there a quick way to tell the chart to use the next default color when I add the next BarSeries to my chart?

    I have the count and hour of day displaying on the chart, but I do not know how to add the text name to the chart.  It defaults to 1, 2, 3,... 

    Any help is appreciated!

     Thanks in Advance

    Filed under: , ,
  •  05-24-2012, 8:45 PM Post no. 32149 in reply to 32108

    Re: How to automatically use next default color for new Series?

    Hi James,

    If you look at the Xceed Chart Explorer for .Net, you will see that if you need to change the labels on the Axes, you can access the Labels collection from the Axis of the ChartControl instance. For example:

    // add axis labels
          m_Chart.Axis(StandardAxis.Depth).DimensionScale.AutoLabels = false;
          m_Chart.Axis(StandardAxis.Depth).Labels.Add("Miami");
          m_Chart.Axis(StandardAxis.Depth).Labels.Add("Chicago");
          m_Chart.Axis(StandardAxis.Depth).Labels.Add("Los Angeles");
          m_Chart.Axis(StandardAxis.Depth).Labels.Add("New York");

    If you need to know the labels of the axes, this page from Xceed's online documentation should help clarify it for you:

    http://doc.xceedsoft.com/products/XceedChart/Axis_Overview.html

    You would need to set the AutoLabels to false in order to make this work though.

    Also, there is no quick way to set a default color for a Bar when they are being added. What you can do is write your own BarSeries class and add a DefaultFIllColor property which would automatically set the fill color of the bar. This is the only possible way that I can think of.


    Marc

    Developer in Technical Support
    Xceed - Multi-talented components - http://xceed.com
View as RSS news feed in XML
Contact | Site Map | Reviews | Legal Terms of Use | Trademarks | Privacy Statement Copyright 2011 Xceed Software Inc.