how to adjust width of candlestick chart' each item?

2 posts, 1 answers
  1. hyojung kwon
    hyojung kwon avatar
    6 posts
    Member since:
    Jan 2010

    Posted 15 Jun 2010 Link to this post

    I am testing candlestick chart.
    I am wondering how to reduce or expand width of each item?

    following is my code :
    <div><div>SeriesMapping sm = new SeriesMapping();</div><div>&nbsp;&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;CandleStickSeriesDefinition candleStickSeriesDefinition = new CandleStickSeriesDefinition();</div><div>&nbsp;&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;candleStickSeriesDefinition.ShowItemToolTipstrue;</div><div>&nbsp;&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;//candleStickSeriesDefinition.ItemStyle = this.Resources["CustomStyle"] as Style;</div><div>&nbsp;&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;sm.SeriesDefinition = candleStickSeriesDefinition;</div><div>&nbsp;&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;sm.LegendLabel = "BP";</div><div><br></div><div>&nbsp;&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;ItemMapping imHigh = new ItemMapping("High", DataPointMember.High);</div><div>&nbsp;&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;ItemMapping imLow = new ItemMapping("Low", DataPointMember.Low);</div><div>&nbsp;&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;ItemMapping imOpen = new ItemMapping("Open", DataPointMember.Open);</div><div>&nbsp;&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;ItemMapping imClose = new ItemMapping("Close", DataPointMember.Close);</div><div><br></div><div>&nbsp;&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;sm.ItemMappings.Add(imHigh);</div><div>&nbsp;&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;sm.ItemMappings.Add(imLow);</div><div>&nbsp;&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;sm.ItemMappings.Add(imOpen);</div><div>&nbsp;&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;sm.ItemMappings.Add(imClose);</div><div>&nbsp;&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;</div><div>&nbsp;&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;RadChart1.SeriesMappings.Add(sm);</div></div><div><br></div><div><span class="Apple-tab-span" style="white-space:pre">       </span>RadChart1.ItemsSource = Repository.GetBPList();<br></div><div></div

    Thanks in advance.
  2. Answer
    Ves avatar
    2926 posts

    Posted 18 Jun 2010 Link to this post

    Hi hyojung kwon,

    The ChartArea.ItemWidthPercent property will affect the width of the CandleSticks drawn:

    RadChart1.DefaultView.ChartArea.ItemWidthPercent = 50;

    the Telerik team
    Do you want to have your say when we set our development plans? Do you want to know when a feature you care about is added or when a bug fixed? Explore the Telerik Public Issue Tracking system and vote to affect the priority of the items
Back to Top