Coloring the 3DBarChart Items of Same series

4 posts, 0 answers
  1. Shashank
    Shashank avatar
    8 posts
    Member since:
    Nov 2011

    Posted 16 Nov 2011 Link to this post

    hi,
    I am new to this silverlight technology and telerik as well.In my application i am fetching data from excel sheet and based on that data I want to make a 3D Bar chart with different data items on x axis in different color.but they should belong to same data series.is there any way to do this??
    I am attaching the image.Similar chart, i want to implement in my silverlight application through telerik.

    If that kind of chart is not possible.can you help me the other ways to implement somewhat similar chart to that.i am attaching one more image similar to this one.in this image i want to increase the width of its data items.

    i am using RadControls for Silverlight Q2 2010 SP2.
    Please help.


    Regards,
    shashank



  2. Petar Marchev
    Admin
    Petar Marchev avatar
    1029 posts

    Posted 21 Nov 2011 Link to this post

    Hi Shashank,

    You can try the code below and also take a look at our demo here which you may find a good starting guide for creating a 3D Bar Series.

    <telerik:RadChart>
         <telerik:RadChart.DefaultSeriesDefinition>
             <telerik:Bar3DSeriesDefinition LegendDisplayMode="DataPointLabel" />
         </telerik:RadChart.DefaultSeriesDefinition>
     </telerik:RadChart>

    By setting the LegendDisplayMode to DataPointLabel you are saying the Legend to display an item for each DataPoint in your series and each series item will be marked with a different color.

    Regards,
    Petar Marchev
    the Telerik team
    Explore the entire Telerik portfolio by downloading the Ultimate Collection trial package. Get it now >>
  3. Shashank
    Shashank avatar
    8 posts
    Member since:
    Nov 2011

    Posted 22 Nov 2011 Link to this post

    hi Petar,

    Thnx for the code.

    Its working for me.but one problem is there.data items are in a series are coming with different colors but with reduced item width.i want to increase the width.let me know please if you have any solution for this.i am attaching the image of output so that u'll get the idea.


    Regards,
    Shashank
  4. Petar Marchev
    Admin
    Petar Marchev avatar
    1029 posts

    Posted 25 Nov 2011 Link to this post

    Hello Shashank,

    Thank you for the attached screenshot.
    To change the items' width you need to set the ItemWidthPercent property of the ChartArea.

    <telerik:RadChart>
     <telerik:RadChart.DefaultView>
      <telerik:ChartDefaultView>
       <telerik:ChartDefaultView.ChartArea>
        <telerik:ChartArea ItemWidthPercent="90" />

    I hope this helps.

    Best wishes,
    Petar Marchev
    the Telerik team

    Explore the entire Telerik portfolio by downloading the Ultimate Collection trial package. Get it now >>

Back to Top