Hi Joseph,
Thank you for submitting the rdl/data. After further investigation the problem is indeed related to the time fields passed to the control. There are actually two problems related to that:
1. The Values collection of the control does not recognice .NET TimeSpan objects (we've fixed that and it will appear in the next SP of the control).
2. The control cannot label time spans - only date time. In order to do this you need to rescale the TimeSpan to date time with some origin.
The workarounds are:
1. In the stored procedure you can output DateTime instead of time (recommended).
2. You can rescale the double values produced by the time span to date time using some origin date. The following code for example does that for all values:
using System;
using System.Drawing;
using System.Diagnostics;
using Nevron.GraphicsCore;
using Nevron.Chart;
using Nevron.ReportingServices;
namespace MyNamespace
{
/// <summary>
/// Sample class
/// </summary>
public class MyClass
{
/// <summary>
/// Main entry point
/// </summary>
/// <param name="context"></param>
public static void RSMain(NRSChartCodeContext context)
{
for (int ci = 0; ci < context.Document.Charts.Count; ci++)
{
NChart chart = context.Document.Charts[ci];
foreach (NSeries series in chart.Series)
{
for (int i = 0; i < series.Values.Count; i++)
{
try
{
double value = (double)series.Values[i];
value = (new DateTime() + TimeSpan.FromTicks((long)value)).ToOADate();
series.Values[i] = value;
}
catch (Exception ex)
{
Debug.WriteLine(ex.Message);
}
}
}
}
}
}
}
Rescales the spans relative to zero date (1899). Note that all values should be imported with Sum in this case (so that you don't have TimeSpan objects in the input data).
Hope this helps - let us know if you have any questions or meet any problems.