/// <summary>
 /// Add elements and attach bindings.
 /// </summary>
 /// <param name="icelc">The context.</param>
 void IRequireEnterLeave.Enter(IChartEnterLeaveContext icelc)
 {
     EnsureAxes(icelc as IChartComponentContext);
     Layer = icelc.CreateLayer(BandPath, Value1Path, Value2Path);
     _trace.Verbose($"enter v:{ValueAxisName}:{ValueAxis}");
     DoBindings(icelc);
 }
 /// <summary>
 /// Initialize after entering VT.
 /// </summary>
 /// <param name="icelc"></param>
 void IRequireEnterLeave.Enter(IChartEnterLeaveContext icelc)
 {
     EnsureAxes(icelc as IChartComponentContext);
     EnsureValuePath(icelc as IChartComponentContext);
     Layer = icelc.CreateLayer();
     _trace.Verbose($"{Name} enter c2(v):{CategoryAxis2Name} {CategoryAxis2} c1:{CategoryAxisName} {CategoryAxis1} d:{DataSourceName}");
     if (PathTemplate == null)
     {
         if (Theme?.PathTemplate == null)
         {
             if (icelc is IChartErrorInfo icei)
             {
                 icei.Report(new ChartValidationResult(NameOrType(), $"No {nameof(PathTemplate)} and {nameof(Theme.PathTemplate)} was not found", new[] { nameof(PathTemplate), nameof(Theme.PathTemplate) }));
             }
         }
     }
     AssignFromRef(icelc as IChartErrorInfo, NameOrType(), nameof(PathStyle), nameof(Theme.PathColumnSeries),
                   PathStyle == null, Theme != null, Theme.PathColumnSeries != null,
                   () => PathStyle = Theme.PathColumnSeries
                   );
     BindPaths = new Evaluators2(CategoryPath, Category2Path, ValuePath, ValueLabelPath);
     if (!BindPaths.IsValid)
     {
         if (icelc is IChartErrorInfo icei)
         {
             icei.Report(new ChartValidationResult(NameOrType(), $"ValuePath: must be specified", new[] { nameof(ValuePath) }));
         }
     }
 }
 /// <summary>
 /// Initialize after entering VT.
 /// </summary>
 /// <param name="icelc"></param>
 void IRequireEnterLeave.Enter(IChartEnterLeaveContext icelc)
 {
     Layer = icelc.CreateLayer();
     _trace.Verbose($"enter d:{DataSourceName}");
     if (Generator == null)
     {
         // TODO error info
         Generator = new IdentityStyleGenerator()
         {
             BaseStyle = Theme.PathColumnSeries
         };
     }
 }
Exemplo n.º 4
0
 /// <summary>
 /// Initialize after entering VT.
 /// </summary>
 /// <param name="icelc"></param>
 void IRequireEnterLeave.Enter(IChartEnterLeaveContext icelc)
 {
     EnsureAxes(icelc as IChartComponentContext);
     EnsureValuePath(icelc as IChartComponentContext);
     Layer = icelc.CreateLayer(Segments);
     _trace.Verbose($"enter v:{ValueAxisName}:{ValueAxis} c:{CategoryAxisName}:{CategoryAxis} d:{DataSourceName}");
     AssignFromRef(icelc as IChartErrorInfo, NameOrType(), nameof(PathStyle), nameof(Theme.PathLineSeries),
                   PathStyle == null, Theme != null, Theme.PathLineSeries != null,
                   () => PathStyle = Theme.PathLineSeries
                   );
     BindTo(this, nameof(PathStyle), Segments, FrameworkElement.StyleProperty);
     BindPaths = new Evaluators(CategoryPath, ValuePath, ValueLabelPath);
     if (!BindPaths.IsValid)
     {
         // report
     }
 }
 /// <summary>
 /// Initialize after entering VT.
 /// </summary>
 /// <param name="icelc"></param>
 void IRequireEnterLeave.Enter(IChartEnterLeaveContext icelc)
 {
     EnsureAxes(icelc as IChartComponentContext);
     EnsureValuePath(icelc as IChartComponentContext);
     Layer = icelc.CreateLayer();
     _trace.Verbose($"{Name} enter v:{ValueAxisName}:{ValueAxis} c:{CategoryAxisName}:{CategoryAxis} d:{DataSourceName}");
     AssignFromRef(icelc as IChartErrorInfo, NameOrType(), nameof(PathStyle), nameof(Theme.PathMarkerSeries),
                   PathStyle == null, Theme != null, Theme.PathMarkerSeries != null,
                   () => PathStyle = Theme.PathMarkerSeries
                   );
     BindPaths = new Evaluators(CategoryPath, ValuePath, ValueLabelPath);
     if (!BindPaths.IsValid)
     {
         if (icelc is IChartErrorInfo icei)
         {
             icei.Report(new ChartValidationResult(NameOrType(), $"ValuePath: must be specified", new[] { nameof(ValuePath) }));
         }
     }
 }
Exemplo n.º 6
0
 /// <summary>
 /// Add elements and attach bindings.
 /// </summary>
 /// <param name="icelc"></param>
 void IRequireEnterLeave.Enter(IChartEnterLeaveContext icelc)
 {
     Layer = icelc.CreateLayer(Axis);
     if (Layer is IChartLayerAnimation icla)
     {
     }
     ApplyLabelStyle(icelc as IChartErrorInfo);
     AssignFromRef(icelc as IChartErrorInfo, NameOrType(), nameof(PathStyle), nameof(Theme.PathAxisCategory),
                   PathStyle == null, Theme != null, Theme.PathAxisCategory != null,
                   () => PathStyle = Theme.PathAxisCategory
                   );
     if (Theme?.TextBlockTemplate == null)
     {
         if (icelc is IChartErrorInfo icei)
         {
             icei.Report(new ChartValidationResult(NameOrType(), $"No {nameof(Theme.TextBlockTemplate)} was not found", new[] { nameof(Theme.TextBlockTemplate) }));
         }
     }
     BindTo(this, nameof(PathStyle), Axis, FrameworkElement.StyleProperty);
 }
Exemplo n.º 7
0
 void IRequireEnterLeave.Enter(IChartEnterLeaveContext icelc)
 {
     EnsureAxes(icelc as IChartComponentContext);
     Layer = icelc.CreateLayer();
     _trace.Verbose($"{Name} enter v:{ValueAxisName} {ValueAxis} c:{CategoryAxisName} {CategoryAxis} d:{DataSourceName}");
     BindPaths = new Evaluators(CategoryPath, ValueLabelPath, ColumnStack.Select(cs => cs.ValuePath));
     if (!BindPaths.IsValid)
     {
         for (int ix = 0; ix < ColumnStack.Count; ix++)
         {
             if (String.IsNullOrEmpty(ColumnStack[ix].ValuePath))
             {
                 if (icelc is IChartErrorInfo icei)
                 {
                     icei.Report(new ChartValidationResult(NameOrType(), $"ValuePath[{ix}] was not set, NO values are generated", new[] { $"ValuePath[{ix}]" }));
                 }
             }
         }
     }
 }
Exemplo n.º 8
0
 /// <summary>
 /// Initialize after entering VT.
 /// </summary>
 /// <param name="icelc"></param>
 public void Enter(IChartEnterLeaveContext icelc)
 {
     EnsureAxes(icelc as IChartComponentContext);
     Layer = icelc.CreateLayer();
     _trace.Verbose($"enter v:{ValueAxisName}:{ValueAxis} c:{CategoryAxisName}:{CategoryAxis} d:{DataSourceName}");
     AssignFromRef(icelc as IChartErrorInfo, NameOrType(), nameof(PathStyle), nameof(Theme.PathMarkerSeries),
                   PathStyle == null, Theme != null, Theme.PathMarkerSeries != null,
                   () => PathStyle = Theme.PathMarkerSeries
                   );
     AssignFromRef(icelc as IChartErrorInfo, NameOrType(), nameof(ReversePathStyle), nameof(PathStyle),
                   ReversePathStyle == null, true, PathStyle != null,
                   () => ReversePathStyle = PathStyle
                   );
     BindPaths = new Evaluators(CategoryPath, OpenValuePath, HighValuePath, LowValuePath, CloseValuePath, ValueLabelPath);
     if (!BindPaths.IsValid)
     {
         if (icelc is IChartErrorInfo icei)
         {
             var props = new List <String>();
             if (String.IsNullOrEmpty(OpenValuePath))
             {
                 props.Add(nameof(OpenValuePath));
             }
             if (String.IsNullOrEmpty(HighValuePath))
             {
                 props.Add(nameof(HighValuePath));
             }
             if (String.IsNullOrEmpty(LowValuePath))
             {
                 props.Add(nameof(LowValuePath));
             }
             if (String.IsNullOrEmpty(CloseValuePath))
             {
                 props.Add(nameof(CloseValuePath));
             }
             icei.Report(new ChartValidationResult(NameOrType(), $"{String.Join(",", props)}: must be specified", props));
         }
     }
 }
Exemplo n.º 9
0
 void IRequireEnterLeave.Enter(IChartEnterLeaveContext icelc)
 {
     EnsureAxes(icelc as IChartComponentContext);
     Layer = icelc.CreateLayer();
     DoBindings(icelc);
 }
Exemplo n.º 10
0
 /// <summary>
 /// Component is entering the chart.
 /// </summary>
 /// <param name="icelc">Context.</param>
 void IRequireEnterLeave.Enter(IChartEnterLeaveContext icelc)
 {
     Layer = icelc.CreateLayer(Path);
     DoBindings(icelc);
 }