Data Series Not Displayed

Charts for Silverlight Forum

Posted 3 years ago by Laura
Version: 15.1.0192
Platform: Applications
Avatar

I put some sample data into two series but only one of them shows up.

Here's my project, referenced dlls should be in the bin/debug folder.

LINK

Comments (5)

Posted 3 years ago by Laura
Avatar

I Believe the two series are being somewhat super imposed over eachother, I say somewhat because this isn't always the case even in the same data set.

Example:

            costs.Add(new CostInfoCustom { Qty = 1, CostDate = new DateTime(2015, 10, 28, 10, 55, 25), TaskInfoKey = new TaskInfo { TaskNo = 2335 } });
            costs.Add(new CostInfoCustom { Qty = 1, CostDate = new DateTime(2015, 10, 28, 10, 55, 25), TaskInfoKey = new TaskInfo { TaskNo = 2335 } });
            costs.Add(new CostInfoCustom { Qty = 7, CostDate = new DateTime(2015, 10, 30, 15, 44, 39), TaskInfoKey = new TaskInfo { TaskNo = 2333 } });
            costs.Add(new CostInfoCustom { Qty = 7, CostDate = new DateTime(2015, 10, 30, 15, 44, 39), TaskInfoKey = new TaskInfo { TaskNo = 2335 } });
            costs.Add(new CostInfoCustom { Qty = 1, CostDate = new DateTime(2015, 10, 28, 9, 42, 54), TaskInfoKey = new TaskInfo { TaskNo = 2333 } });

 Produces:

Posted 3 years ago by Actipro Software Support - Cleveland, OH, USA
Avatar

Hi Laura,

When using date/time data, you should generally specify the XYDateTimeAxis yourself so that you can set an appropriate SlotIntervalUnit and SlotInterval properties. That might help in this scenario.

Thank you for the sample project link however it references external assemblies so we can't debug with it.  Please make sure that if you prepare a sample project, you do it with a little code as possible and include the full source needed to repro the issue, instead of using types from your company's assemblies.  You don't need to include our Actipro assemblies in the .zip either, just reference them in the project.  Thanks!


Actipro Software Support

Posted 3 years ago by Laura
Avatar

The dlls should be in the bin folder, if not I'll zip them up for you.

Posted 3 years ago by Laura
Avatar
Posted 3 years ago by Actipro Software Support - Cleveland, OH, USA
Avatar

Thank you, we were able to narrow down the problem.  The problem is that when doing stacked bars for a date/time axis, the dates will need to be all the same value for data points within the slots, or else the previous bar in the same stack won't be found properly.  If you add this line to convert all CostDate values to their pure Date value (trimming times), it will work as expected:

var costs = Costs.Cast<CostInfoEx>().ToList();
foreach (var cost in costs)
	cost.CostDate = cost.CostDate.Date;

Also, the y-axis you add needs to be a XYDoubleAxis instead of XYDecimalAxis, since int values like Qty are changed to doubles, not decimals.  Thus the presence of your XYDecimalAxis isn't doing anything in the sample.  By switching it to XYDoubleAxis, the minimum and tick interval you set will take hold.


Actipro Software Support

The latest build of this product (v2018.1 build 0231) was released 4 months ago, which was after the last post in this thread.

Add Comment

Please log in to a validated account to post comments.