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

Help - Chart with OADate on XAxis issues!

3 Answers 66 Views
Chart
This is a migrated thread and some comments may be shown as answers.
JAS J
Top achievements
Rank 1
JAS J asked on 08 Sep 2011, 05:18 PM

HELP!!!

Could really use some help on this...

Cant seem to figure this out. I am having issues getting a chart to display corectly. When this chart displays, I get a small blinking dot at the the 0 value if the X-Axis.

thanks in Advance!
Jas

---------

This is the XAML that creates the chart in a timebar
<telerik:RadTimeBar PeriodStart="{Binding SummaryTimeBarPeriodStart, Mode=TwoWay}" 
        PeriodEnd="{Binding SummaryTimeBarPeriodEnd, Mode=TwoWay}"  
        VisiblePeriodStart="{Binding SummaryTimeBarVisiblePeriodStart, Mode=TwoWay}" 
        VisiblePeriodEnd="{Binding SummaryTimeBarVisiblePeriodEnd, Mode=TwoWay}" 
        SelectionStart="{Binding SummaryTimeBarSelectionPeriodStart, Mode=TwoWay}"
        SelectionEnd="{Binding SummaryTimeBarSelectionPeriodEnd, Mode=TwoWay}"
        IsSnapToIntervalEnabled="False">
    <telerik:RadTimeBar.Intervals>
        <telerik:HourInterval />
    </telerik:RadTimeBar.Intervals>

    <telerik:RadChart Name="summaryChart" ItemsSource="{Binding SummaryTimebarQCV}"
              SeriesMappings="{Binding SummaryTimebarSMC}">
        <telerik:RadChart.DefaultView>
            <telerik:ChartDefaultView>
                <telerik:ChartDefaultView.ChartLegend>
                    <telerik:ChartLegend Name="legend2" />
                </telerik:ChartDefaultView.ChartLegend>
                <telerik:ChartDefaultView.ChartArea>       
                    <telerik:ChartArea LegendName="legend2"/>
                </telerik:ChartDefaultView.ChartArea>
            </telerik:ChartDefaultView>
        </telerik:RadChart.DefaultView>
    </telerik:RadChart>
</telerik:RadTimeBar>

The bindings are as follows:
private QueryableCollectionView _summaryTimebarQcv;
public QueryableCollectionView SummaryTimebarQCV
{
    get { return this._summaryTimebarQcv; }
    set { if (_summaryTimebarQcv == value) return; _summaryTimebarQcv = value; OnPropertyChanged("SummaryTimebarQCV"); }
}
private SeriesMappingCollection _summaryTimebarSmc;
public SeriesMappingCollection SummaryTimebarSMC
{     get    { return this._summaryTimebarSmc; }
      set    { if (this._summaryTimebarSmc != value)    {this._summaryTimebarSmc = value;
             this.OnPropertyChanged("SummaryTimebarSMC");} }
}

And this is how I initialize the data
 
List<List<Series>> lls = new List<List<Series>>();
lls.Add(series1.ToList());
SummaryTimebarQCV = new QueryableCollectionView(lls);

SummaryTimebarSMC = new SeriesMappingCollection();
LineSeriesDefinition sd = new LineSeriesDefinition { ShowItemLabels = false, ShowPointMarks = false };
           
SeriesMapping sm = new SeriesMapping { LegendLabel = "Volume", SeriesDefinition = sd };
sm.CollectionIndex = 0;
sm.ItemMappings.Add(new ItemMapping("timestampOA", DataPointMember.XValue));
sm.ItemMappings.Add(new ItemMapping("timestampOA", DataPointMember.YValue, ChartAggregateFunction.Count));
SummaryTimebarSMC.Add(sm);

The class definition for series is:
public class Series
{
    public int Vol { get; set; }
    public DateTime TimeStamp { get; set; }
    public double TimeStampOA { get { return TimeStamp.ToOADate(); } }
}

 

3 Answers, 1 is accepted

Sort by
0
JAS J
Top achievements
Rank 1
answered on 09 Sep 2011, 09:20 AM
Anyone? Any help would be really appreciated.
thanks,
Jas
0
JAS J
Top achievements
Rank 1
answered on 13 Sep 2011, 06:13 AM
Before I start ripping everything out and starting afresh, anyone have any insights into what could be wrong?
thanks!
0
Yavor
Telerik team
answered on 13 Sep 2011, 07:33 AM
Hi Jas J,

Based on the supplied information, it is hard to determine what is causing this unwanted behavior. To properly address the issue, it will be best if you open a formal support ticket, and send us a small working project, demonstrating your setup, and showing the unwanted behavior. We will debug it locally, and advise you further.

Kind regards,
Yavor
the Telerik team

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

Tags
Chart
Asked by
JAS J
Top achievements
Rank 1
Answers by
JAS J
Top achievements
Rank 1
Yavor
Telerik team
Share this question
or