Hi ,
I filling an ultrachart with a numerictimeseries. I want to know if it is possible to remove week end, on the time line ?
Thanks
Hello Eltorfuerte,
I`m not famlar with your scenario, but maybe you could used FillSceneGraph() method and remove weekend from the chart. I made small sample for you with such kind scenario. Please take a look at the attached sample. Also you could take a look at another forum thread where I discuss something similar: http://community.infragistics.com/forums/t/63830.aspx
Also you could take a look in our online documentation. Topic "Customize the display of Null Values": http://help.infragistics.com/Help/NetAdvantage/WinForms/2011.2/CLR2.0/html/Chart_Customize_the_Display_of_Null_Values.html
Also, maybe you could try other possible approach - to exclude from your DataSet all values with weekends and then to apply your filtered DataSet to your UltraChart.
Please let me know if you have any questions
Hi Thanks a lot for your answer, however it is not exactly what I want . I would like to have every point linked. Which mean that for the example you gave one should not see gap between 09/03/2012 and 12/03/2012 and between 16/03/2012 and 19/03/2012.
Do you know how one can do that ?
If you want to achieve desired bahavior using my sample from the previous post , you should add new Line primitive in FillSceneGraphe() event and drawn a line between the points (with the gap). But this approach is very custom, so my suggestion is to used one of these two approaches below. There are very simple and shorter.
Option 1: Using the properties NullHandling and EmptyStyle:
// Option 1 ultraChart1.ChartType = ChartType.LineChart; ultraChart1.LineChart.NullHandling = NullHandling.InterpolateSimple; ultraChart1.Data.SwapRowsAndColumns = true; ultraChart1.Data.EmptyStyle.EnableLineStyle = true; ultraChart1.Axis.X.Extent = 120; ultraChart1.DataSource = dt;
// Option 1
ultraChart1.ChartType = ChartType.LineChart;
ultraChart1.LineChart.NullHandling = NullHandling.InterpolateSimple;
ultraChart1.Data.SwapRowsAndColumns = true;
ultraChart1.Data.EmptyStyle.EnableLineStyle = true;
ultraChart1.Axis.X.Extent = 120;
ultraChart1.DataSource = dt;
Option 2: Using Linq
// Option 2 ultraChart1.ChartType = ChartType.LineChart; ultraChart1.Data.SwapRowsAndColumns = true; ultraChart1.Axis.X.Extent = 120; var a = from q in dt.AsEnumerable() where q.IsNull(1) != true select q; ultraChart1.DataSource = a.AsDataView();
// Option 2
var a = from q in dt.AsEnumerable()
where q.IsNull(1) != true
select q;
ultraChart1.DataSource = a.AsDataView();
Please take a look at tha new attached sample and screenshot where I show both approaches and let me know if you have any questions.
Thanks for your answer. However, when I try to applicate it to my case I hae a big red cross instead of my graph whenn I use the fillscenegraph thing.
Do you have an idea why ?
Hi,
Did you take a look at the second sample (UltraChartHideWeekend_2.zip) that I already upload in the previous post. The desired behavior is achieved without using FillSceneGraph event.
The mentioned Red cross could appear when you try to modify your current primitive in the FillSceneGraph() event. Could you please upload your sample. I`ll be glad to take a look on it. Let me know if you have any questions.
Regards