Profile Picture

Chart Subtype Series XYScatter EmptyDataPointsValueMode or DateTime Starts 1899

Posted By Oliver Krieger 11 Years Ago

Chart Subtype Series XYScatter EmptyDataPointsValueMode or DateTime...

Author
Message
Oliver Krieger
Posted 11 Years Ago
View Quick Profile
Forum Newbie

Forum Newbie (5 reputation)Forum Newbie (5 reputation)Forum Newbie (5 reputation)Forum Newbie (5 reputation)Forum Newbie (5 reputation)Forum Newbie (5 reputation)Forum Newbie (5 reputation)Forum Newbie (5 reputation)Forum Newbie (5 reputation)

Group: Forum Members
Last Active: 11 Years Ago
Posts: 5, Visits: 1
Hello all,

I have a datatable which contains the columns "timestamp", "tagname" and "value".
I want to show these values in a chart ordered by tagnames.
Some tags hasn't values for all timestamps, which displayed as a gap and not a staight line.

About this, I configure all series like that: mySeries.Values.EmptyDataPoints.ValueMode = Nevron.Chart.EmptyDataPointsValueMode.Average;

Now if i choose the subtype "series(0)", no gaps will be displayed, but the x labels starts with a date (year 1899).
If i choose the subtype "xyscatter", the gaps will be displayed, but the x lables starts with the right timestamp.

At the end I need no gaps and the right timestamp should be displayed.

How can i solve this problem.

Thanx for your help.


Oli


Nevron Support
Posted 11 Years Ago
View Quick Profile
Supreme Being

Supreme Being (4,329 reputation)Supreme Being (4,329 reputation)Supreme Being (4,329 reputation)Supreme Being (4,329 reputation)Supreme Being (4,329 reputation)Supreme Being (4,329 reputation)Supreme Being (4,329 reputation)Supreme Being (4,329 reputation)Supreme Being (4,329 reputation)

Group: Forum Members
Last Active: Last Year
Posts: 3,039, Visits: 3,746

Hi Oliver,

It looks like you have a date-time axis applied to a ordinal (categorical) data because 1899 actually maps to zero, which means that the control plots a label corresponding to the value of 0. Can you send us the rdl or chart template for this chart for further review? A screenshot will also be helpful...



Best Regards,
Nevron Support Team



Oliver Krieger
Posted 11 Years Ago
View Quick Profile
Forum Newbie

Forum Newbie (5 reputation)Forum Newbie (5 reputation)Forum Newbie (5 reputation)Forum Newbie (5 reputation)Forum Newbie (5 reputation)Forum Newbie (5 reputation)Forum Newbie (5 reputation)Forum Newbie (5 reputation)Forum Newbie (5 reputation)

Group: Forum Members
Last Active: 11 Years Ago
Posts: 5, Visits: 1
Hi,

Here are the rdl file.

I found something new at sub type “Series(0)”:

If I set the “Scale Mode” of primary x axis to “Automatic(0)” (before on Numeric (1)), the chart will be displayed the right timestamps, but the scaling of the timestamps doesn’t work. (Short timespan => looks ok, huge timespan => to much scales with labels and to small font size.)


##RDL FILE




Procedure Analyst Procedural Report with Continuous Data



OPC_HDA


ataSourceID>88c11e8d-0a25-4e33-9f2d-398a54bf2d33ataSourceID>


DataSource_Common
ataSourceID>caeb191a-b6eb-41d1-8906-0fe592260904ataSourceID>






PHD Tag
System.String



DataSource_Common
="SELECT [PHD Tag] as [PHD Tag] FROM " & Parameters!sSchema.value & ".[PA_RVW_ALIASMAPPING] where [Equipment Name] = '" & Parameters!Equipment.Value & "' and ALIAS in ('" & Join(Parameters!AliasTag.Value ,"','") & "')"
true





HistTag
System.String


HistTime
System.DateTime


Values
System.Double



DataSource_history
=code.sConcat(Parameters!StartTime.Value,iif(isnothing(Parameters!EndTime.Value)=true, Now(),Parameters!EndTime.Value),Join(Parameters!PHD_Tag.Value,","),Parameters!AFunction.Value,Parameters!NSamples.Value)






NChart

DataSet_History





=Fields!HistTime.Value




=Fields!HistTime.Value




DGT
Categories


Label
=cdate(Fields!HistTime.Value)










=Fields!HistTag.Value




DGT
Series


Label
=Fields!HistTag.Value






DGT
Values


Label
Values











L
=Fields!Values.Value


V
=Fields!Values.Value





19cm
19cm


ChartAreas.Count
1


ChartAreas0.Axes.Depth.ConstRanges.ContainerType
DepthAxis


ChartAreas0.Axes.Depth.Section.ContainerType
DepthAxis


ChartAreas0.Axes.PolarAngle.ConstRanges.ContainerType
PolarRadarAxis


ChartAreas0.Axes.PolarAngle.Section.ContainerType
PolarRadarAxis


ChartAreas0.Axes.PolarValue.ConstRanges.ContainerType
PolarRadarAxis


ChartAreas0.Axes.PolarValue.Section.ContainerType
PolarRadarAxis


ChartAreas0.Axes.PrimaryX.AdvancedScaleSettings.LabelAlignment
MiddleCenter


ChartAreas0.Axes.PrimaryX.AdvancedScaleSettings.LevelOverlapResolveMode
68


ChartAreas0.Axes.PrimaryX.AdvancedScaleSettings.ScaleLevelBottomPadding
5


ChartAreas0.Axes.PrimaryX.AdvancedScaleSettings.ScaleLevelTopPadding
5


ChartAreas0.Axes.PrimaryX.CatScale.GridStyle
None


ChartAreas0.Axes.PrimaryX.CatScale.ShowTicksBetweenDataPoints
False


ChartAreas0.Axes.PrimaryX.ConstRanges.ContainerType
XAxis


ChartAreas0.Axes.PrimaryX.NumericScale.DateTimeScale.DateTimeLabelFormatting.FormattingMode
Fixed


ChartAreas0.Axes.PrimaryX.NumericScale.DateTimeScale.DateTimeLabelFormatting.LabelFormat
g


ChartAreas0.Axes.PrimaryX.NumericScale.DateTimeScale.DateTimeSpan.DateTimeUnit
Tick


ChartAreas0.Axes.PrimaryX.NumericScale.DateTimeScale.MaxCount
5


ChartAreas0.Axes.PrimaryX.NumericScale.DateTimeScale.MinDistance
10


ChartAreas0.Axes.PrimaryX.NumericScale.NumberScale.MinDistance
50


ChartAreas0.Axes.PrimaryX.NumericScale.SubType
DateTime


ChartAreas0.Axes.PrimaryX.NumericScale.ValueTimelineScale.ValueTimelineScaleRow0.DateTimeLabelFormatting.LabelFormat
g


ChartAreas0.Axes.PrimaryX.NumericScale.ValueTimelineScale.ValueTimelineScaleRow1.DateTimeLabelFormatting.FormattingMode
Fixed


ChartAreas0.Axes.PrimaryX.NumericScale.ValueTimelineScale.ValueTimelineScaleRow1.DateTimeLabelFormatting.LabelFormat
g


ChartAreas0.Axes.PrimaryX.NumericScale.ValueTimelineScale.ValueTimelineScaleRow2.DateTimeLabelFormatting.FormattingMode
Fixed


ChartAreas0.Axes.PrimaryX.NumericScale.ValueTimelineScale.ValueTimelineScaleRow2.DateTimeLabelFormatting.LabelFormat
g


ChartAreas0.Axes.PrimaryX.Range.InflateMode
Tick


ChartAreas0.Axes.PrimaryX.Range.InflateRangeBegin
False


ChartAreas0.Axes.PrimaryX.Range.InflateRangeEnd
False


ChartAreas0.Axes.PrimaryX.ScaleMode
Numeric


ChartAreas0.Axes.PrimaryX.Section.ContainerType
XAxis


ChartAreas0.Axes.PrimaryY.ConstRanges.ContainerType
YAxis


ChartAreas0.Axes.PrimaryY.NumericScale.NumberScale.MinDistance
50


ChartAreas0.Axes.PrimaryY.Section.ContainerType
YAxis


ChartAreas0.Axes.Radar.ConstRanges.ContainerType
PolarRadarAxis


ChartAreas0.Axes.Radar.Section.ContainerType
PolarRadarAxis


ChartAreas0.Axes.SecondaryX.ConstRanges.ContainerType
XAxis


ChartAreas0.Axes.SecondaryX.Section.ContainerType
XAxis


ChartAreas0.Axes.SecondaryX.Visibility
Hidden


ChartAreas0.Axes.SecondaryY.ConstRanges.ContainerType
YAxis


ChartAreas0.Axes.SecondaryY.ScaleMode
Numeric


ChartAreas0.Axes.SecondaryY.Section.ContainerType
YAxis


ChartAreas0.ChartType
Line


ChartAreas0.Fx2D.MaxDockZoneMargins.Bottom
50


ChartAreas0.Fx2D.MaxDockZoneMargins.Left
50


ChartAreas0.Fx2D.MaxDockZoneMargins.Right
50


ChartAreas0.Fx2D.MaxDockZoneMargins.Top
50


ChartAreas0.Label Layout.EnableInitialPositioning
True


ChartAreas0.Line.SamplingMode
Enabled


ChartAreas0.StyleSheet.Palette.Count
6


ChartAreas0.StyleSheet.Palette.FillStyle0
EmbeddedFJvb3Q+DQogIDxPYmplY3QgdHlwZUlkPSIwIiBuYW1lPSJSb290Ij4NCiAgICA8QXR0cmlidXRlcyBDb2xvcj0iMjI7MCw0MjkzNjgxMjAxIiBNYXRlcmlhbFN0eWxlPSIyMjsiIEltYWdlRmlsdGVycz0iMjE7IiAvPg0KICA8L09iamVjdD4NCiAgPElkVHlwZVRhYmxlPg0KICAgIDxLZXlWYWx1ZVBhaXIgS2V5PSIwIiBWYWx1ZT0iTmV2cm9uLkdyYXBoaWNzQ29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ICAgIDxLZXlWYWx1ZVBhaXIgS2V5PSIwIiBWYWx1ZT0iTmV2cm9uLkdyYXBoaWNzQ29yZS5OQ29sb3JGaWxsU3R5bGUiIC8+DQogIDwvSWRUeXBlVGFibGU+DQo8L1Jvb3Q+


ChartAreas0.StyleSheet.Palette.FillStyle4
EmbeddedFJvb3Q+DQogIDxPYmplY3QgdHlwZUlkPSIwIiBuYW1lPSJSb290Ij4NCiAgICA8QXR0cmlidXRlcyBDb2xvcj0iMjI7MCw0Mjk0NDE1OTI4IiBNYXRlcmlhbFN0eWxlPSIyMjsiIEltYWdlRmlsdGVycz0iMjE7IiAvPg0KICA8L09iamVjdD4NCiAgPElkVHlwZVRhYmxlPg0KICAgIDxLZXlWYWx1ZVBhaXIgS2V5PSIwIiBWYWx1ZT0iTmV2cm9uLkdyYXBoaWNzQ29yZS5OQ29sb3JGaWxsU3R5bGUiIC8+DQogIDwvSWRUeXBlVGFibGU+DQo8L1Jvb3Q+


ChartAreas0.StyleSheet.Palette.FillStyle5
EmbeddedFJvb3Q+DQogIDxPYmplY3QgdHlwZUlkPSIwIiBuYW1lPSJSb290Ij4NCiAgICA8QXR0cmlidXRlcyBDb2xvcj0iMjI7MCw0MjgyNjY5Njc2IiBNYXRlcmlhbFN0eWxlPSIyMjsiIEltYWdlRmlsdGVycz0iMjE7IiAvPg0KICA8L09iamVjdD4NCiAgPElkVHlwZVRhYmxlPg0KICAgIDxLZXlWYWx1ZVBhaXIgS2V5PSIwIiBWYWx1ZT0iTmV2cm9uLkdyYXBoaWNzQ29yZS5OQ29sb3JGaWxsU3R5bGUiIC8+DQogIDwvSWRUeXBlVGFibGU+DQo8L1Jvb3Q+


ChartAreasLayout
SingleRow


Code.SourceCode

using System;
using System.Drawing;
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)
{
Color[] lineColors = new Color[]
{
Color.Blue,
Color.DarkOrange,
Color.Red,
Color.Green,
Color.DarkOrchid,
Color.DarkCyan,
Color.BlueViolet,
Color.Brown,
Color.DarkTurquoise,
Color.Magenta,
Color.DarkGray,
Color.Navy,
Color.Teal,
Color.CadetBlue,
Color.Coral,
Color.Black,
Color.DeepPink,
Color.Chocolate,
Color.SpringGreen,
Color.Peru

};
string soutput;
if (context.Document.Charts.Count == 0)
return;
// get the first chart in the document
NChart chart = context.Document.Charts[0];
if (chart.Series.Count == 0)
return;

soutput = chart.Series.Count.ToString();
NLineSeries point = chart.Series[0] as NLineSeries;
if (point == null)
return;

for (int i = 0; i < chart.Series.Count; i++)
{
// create a custom Y axis
NCartesianAxisCollection axes = (NCartesianAxisCollection)chart.Axes;
NAxis axisY = axes.AddCustomAxis(AxisOrientation.Vertical, AxisDockZone.FrontLeft);
axisY.Anchor = new NDockAxisAnchor(AxisDockZone.FrontLeft, true, 0, 100);

// create the scale
NLinearScaleConfigurator scaleY = new NLinearScaleConfigurator();
axisY.ScaleConfigurator = scaleY;

axisY.Visible = true;


//NLineSeries lineSeries = chart.Series[i] as NLineSeries;
NXYScatterSeries lineSeries = chart.Series[i] as NXYScatterSeries;



if (lineSeries != null)
{
lineSeries.BorderStyle.Color = lineColors[i % lineColors.Length];
lineSeries.BorderStyle.Width = new NLength(2, NGraphicsUnit.Pixel);
lineSeries.DisplayOnAxis(StandardAxis.PrimaryY, false);
lineSeries.DisplayOnAxis(axisY.AxisId, true);

scaleY.RulerStyle.BorderStyle.Color = lineSeries.BorderStyle.Color;
scaleY.RulerStyle.BorderStyle.Width = lineSeries.BorderStyle.Width;

//scaleY.MajorGridStyle.SetShowAtWall(ChartWallType.Back, true);
//scaleY.MajorGridStyle.LineStyle.Color = lineSeries.BorderStyle.Color;
//scaleY.MajorGridStyle.LineStyle.Pattern = LinePattern.DashDot;

scaleY.LabelStyle.TextStyle.FillStyle = new NColorFillStyle(lineSeries.BorderStyle.Color);
scaleY.LabelStyle.TextStyle.FontStyle = new NFontStyle("Verdana", 8);

scaleY.OuterMajorTickStyle.LineStyle.Color = lineSeries.BorderStyle.Color;
scaleY.InnerMajorTickStyle.LineStyle.Color = lineSeries.BorderStyle.Color;

lineSeries.Values.EmptyDataPoints.ValueMode = Nevron.Chart.EmptyDataPointsValueMode.Average;
}
}

}
}
}



Legends.Count
1


Legends0.ItemsLayout
FixedCols


Legends0.Position.DockPosition
BottomCenter


LicenseKey
af4519a6-5517-0174-beb8-159f4a003c06,b329d416-0503-689b-1502-9c83ca940cbd


Margins.Bottom
5


Margins.Left
5


Margins.Right
5


Margins.Top
5


Padding.Bottom
5


Padding.Left
5


Padding.Right
5


Padding.Top
5


StyleSheet.Palette.Count
6


StyleSheet.Palette.FillStyle0
EmbeddedFJvb3Q+DQogIDxPYmplY3QgdHlwZUlkPSIwIiBuYW1lPSJSb290Ij4NCiAgICA8QXR0cmlidXRlcyBDb2xvcj0iMjI7MCw0MjkzNjgxMjAxIiBNYXRlcmlhbFN0eWxlPSIyMjsiIEltYWdlRmlsdGVycz0iMjE7IiAvPg0KICA8L09iamVjdD4NCiAgPElkVHlwZVRhYmxlPg0KICAgIDxLZXlWYWx1ZVBhaXIgS2V5PSIwIiBWYWx1ZT0iTmV2cm9uLkdyYXBoaWNzQ29yZS5OQ29sb3JGaWxsU3R5bGUiIC8+DQogIDwvSWRUeXBlVGFibGU+DQo8L1Jvb3Q+


StyleSheet.Palette.FillStyle1
EmbeddedFJvb3Q+DQogIDxPYmplY3QgdHlwZUlkPSIwIiBuYW1lPSJSb290Ij4NCiAgICA8QXR0cmlidXRlcyBDb2xvcj0iMjI7MCw0Mjg4ODUxMzgyIiBNYXRlcmlhbFN0eWxlPSIyMjsiIEltYWdlRmlsdGVycz0iMjE7IiAvPg0KICA8L09iamVjdD4NCiAgPElkVHlwZVRhYmxlPg0KICAgIDxLZXlWYWx1ZVBhaXIgS2V5PSIwIiBWYWx1ZT0iTmV2cm9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XlWYWx1ZVBhaXIgS2V5PSIwIiBWYWx1ZT0iTmV2cm9uLkdyYXBoaWNzQ29yZS5OQ29sb3JGaWxsU3R5bGUiIC8+DQogIDwvSWRUeXBlVGFibGU+DQo8L1Jvb3Q+


StyleSheet.Palette.FillStyle5
EmbeddedFJvb3Q+DQogIDxPYmplY3QgdHlwZUlkPSIwIiBuYW1lPSJSb290Ij4NCiAgICA8QXR0cmlidXRlcyBDb2xvcj0iMjI7MCw0MjgyNjY5Njc2IiBNYXRlcmlhbFN0eWxlPSIyMjsiIEltYWdlRmlsdGVycz0iMjE7IiAvPg0KICA8L09iamVjdD4NCiAgPElkVHlwZVRhYmxlPg0KICAgIDxLZXlWYWx1ZVBhaXIgS2V5PSIwIiBWYWx1ZT0iTmV2cm9uLkdyYXBoaWNzQ29yZS5OQ29sb3JGaWxsU3R5bGUiIC8+DQogIDwvSWRUeXBlVGFibGU+DQo8L1Jvb3Q+







7.48031in


Oliver Krieger
Posted 11 Years Ago
View Quick Profile
Forum Newbie

Forum Newbie (5 reputation)Forum Newbie (5 reputation)Forum Newbie (5 reputation)Forum Newbie (5 reputation)Forum Newbie (5 reputation)Forum Newbie (5 reputation)Forum Newbie (5 reputation)Forum Newbie (5 reputation)Forum Newbie (5 reputation)

Group: Forum Members
Last Active: 11 Years Ago
Posts: 5, Visits: 1
Sorry, the attachments doesn't work.

I rename the rdl file with extension png!!

Attachments
Chart(Numeric).png (462 views, 98.00 KB)
Chart(Automatic).png (467 views, 138.00 KB)
TREND001.rdl.png (445 views, 33.00 KB)


Similar Topics


Reading This Topic