This is a migrated thread and some comments may be shown as answers.

Need information on Stick Series/Stick Chart

1 Answer 42 Views
Chart
This is a migrated thread and some comments may be shown as answers.
Vinod Sardar
Top achievements
Rank 1
Vinod Sardar asked on 22 Jun 2010, 10:56 AM

Hi,

i have tried following thing for Stick chart. Following thing is worling fine now issue:

public partial class MainPage : UserControl  
    {  
        public MainPage()  
        {  
            InitializeComponent();  
 
            InitializeChart();  
        }  
 
        private void InitializeChart()  
        {  
            Telerik.Windows.Controls.Charting.StickSeriesDefinition cssd = new StickSeriesDefinition();  
            cssd.ShowItemToolTips = true;             
 
 
            telerikChart.DefaultSeriesDefinition = cssd;  
            telerikChart.ItemsSource = GetStocks();  
            SeriesMapping sm=new SeriesMapping();  
            sm.ItemMappings.Add(new ItemMapping("Name", DataPointMember.XCategory));  
            sm.ItemMappings.Add(new ItemMapping("Open",DataPointMember.Open));  
            sm.ItemMappings.Add(new ItemMapping("Close", DataPointMember.Close));  
            sm.ItemMappings.Add(new ItemMapping("Low", DataPointMember.Low));  
            sm.ItemMappings.Add(new ItemMapping("High", DataPointMember.High));  
            sm.ItemMappings.Add(new ItemMapping("High", DataPointMember.Tooltip));  
              
 
            telerikChart.SeriesMappings.Add(sm);  
            telerikChart.DefaultSeriesDefinition.ShowItemLabels = true;  
        }  
 
        private List<Stock> GetStocks()  
        {  
            List<Stock> lstStock = new List<Stock>();  
 
            for (int i = 0; i < 1000; i=i+100)  
            {  
                Stock s = new Stock();  
                s.Name = "Stock" + i;  
                s.Open = i + 100;  
                s.Low = i;  
                Random r = new Random(i);  
                r.NextDouble();  
                s.Close = r.Next(100,150) + i;  
                s.High = s.Close + i;  
                lstStock.Add(s);  
            }  
 
            return lstStock;  
        }  
 
          
 
    }  
 
    public class Stock  
    {  
 
        public string Name { getset; }  
        public double Open { getset; }  
        public double Close { getset; }  
        public double High { getset; }  
        public double Low { getset; }  
 
    } 

Stick chart is also shown (Plz See attachment).

Issue:

I have set telerikChart.DefaultSeriesDefinition.ShowItemLabels = true;  
so that to see the Item Label, but stick chart is showing 0 as highlighted in the screenshot. Is there way to see open,Close,Low.high value of the stick as a item label?


Can you please provide me good sample for the same. also provide pointer to doc that explains the Stick chart.

1 Answer, 1 is accepted

Sort by
0
Ves
Telerik team
answered on 25 Jun 2010, 08:34 AM
Hello Vinod,

I am afraid this functionality is not currently available. I have logged it, so our developers will consider it for implementation. I have also updated your Telerik points. You can track the feature and vote for it here.

Best regards,
Ves
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
Tags
Chart
Asked by
Vinod Sardar
Top achievements
Rank 1
Answers by
Ves
Telerik team
Share this question
or