Exemple #1
0
        protected Series CreateSeries <TView>(ICurveDataSettings curve, ViewType viewType, Action <TView> viewConfiguration, ScaleType argumentScaleType = ScaleType.Numerical)
        {
            var series = new Series(curve.Caption, viewType)
            {
                ShowInLegend      = false,
                ArgumentScaleType = argumentScaleType,
                ValueScaleType    = ScaleType.Numerical,
                LabelsVisibility  = DefaultBoolean.False,
                Visible           = true,
                View = { Color = curve.Color },
            };


            var pointSeriesView = series.View as PointSeriesView;

            if (pointSeriesView != null)
            {
                pointSeriesView.PointMarkerOptions.Kind = _symbolMapper.MapFrom(curve.Symbol);
            }

            if (viewConfiguration != null)
            {
                var view = series.View.DowncastTo <TView>();
                viewConfiguration(view);
            }

            return(series);
        }
Exemple #2
0
 protected Series CreateFinancialSeries(ICurveDataSettings curve)
 {
     return(CreateSeries <FinancialSeriesViewBase>(curve, ViewType.CandleStick, view =>
     {
         view.ReductionOptions.Visible = false;
         view.LevelLineLength = 0;
         view.LineThickness = 1;
     }));
 }
        private Series createPointSeries(ICurveDataSettings curve, MarkerKind markerKind)
        {
            var series    = CreateSeries(curve, ViewType.Point);
            var pointView = series.View.DowncastTo <PointSeriesView>();

            pointView.PointMarkerOptions.Kind = markerKind;
            pointView.PointMarkerOptions.Size = 5;
            return(series);
        }
        private Series createBoxSeries(ICurveDataSettings curve)
        {
            var series             = CreateSeries(curve, ViewType.CandleStick);
            var fiancialSeriesView = series.View.DowncastTo <FinancialSeriesViewBase>();

            fiancialSeriesView.LineThickness          = 1;
            fiancialSeriesView.ReductionOptions.Color = fiancialSeriesView.Color;
            return(series);
        }
Exemple #5
0
 protected Series CreateRangeAreaSeries(ICurveDataSettings curve)
 {
     return(CreateSeries <RangeAreaSeriesView>(curve, ViewType.RangeArea, view =>
     {
         view.Marker1Visibility = DefaultBoolean.False;
         view.Marker2Visibility = DefaultBoolean.False;
         view.FillStyle.FillMode = FillMode.Solid;
         view.Transparency = Constants.RANGE_AREA_TRANSPARENCY;
     }));
 }
Exemple #6
0
 protected Series CreateLineSeries(ICurveDataSettings curve)
 {
     return(CreateSeries <LineSeriesView>(curve, ViewType.Line, view => { view.LineStyle.DashStyle = _lineStyleMapper.MapFrom(curve.LineStyle); }));
 }
Exemple #7
0
 protected Series CreateSeries(ICurveDataSettings curve, ViewType viewType, ScaleType argumentScaleType = ScaleType.Numerical)
 {
     return(CreateSeries <SeriesViewBase>(curve, viewType, null, argumentScaleType));
 }