private void FlexChart1_Rendered(object sender, C1.Win.Chart.RenderEventArgs e)
 {
     if (_axisScrollbar == null)
     {
         _axisScrollbar = new C1.Win.Chart.Interaction.AxisScrollbar(flexChart1.AxisX);
     }
 }
예제 #2
0
 private void FlexChart1_Rendered(object sender, RenderEventArgs e)
 {
     if (axisScrollbar == null)
     {
         axisScrollbar = new C1.Win.Chart.Interaction.AxisScrollbar(flexChart1.AxisX);
         axisScrollbar.ValueChanged += (s, ev) =>
         {
             flexChart1.AxisX.Min = axisScrollbar.LowerValue;
             flexChart1.AxisX.Max = axisScrollbar.UpperValue;
         };
     }
 }
        protected override void SetupChart()
        {
            this.flexChart1.ChartType         = ChartType.Line;
            this.flexChart1.Header.Content    = "Daily Price Movement";
            this.flexChart1.Header.Style.Font = StyleInfo.ChartHeaderFont;

            this.flexChart1.DataSource = FinancialDataSource.GetQuotes(1000);
            this.flexChart1.BindingX   = "Date";
            this.flexChart1.Series.Add(new Series {
                Binding = "High"
            });
            this.flexChart1.Rendering += (s, e) =>
            {
                if (_horizontalScrollbar != null && _verticalScrollbar != null)
                {
                    return;
                }
                _horizontalScrollbar            = new C1.Win.Chart.Interaction.AxisScrollbar(flexChart1.AxisX);
                _horizontalScrollbar.UpperValue = _horizontalScrollbar.LowerValue + 150;

                _verticalScrollbar = new C1.Win.Chart.Interaction.AxisScrollbar(flexChart1.AxisY);
                _verticalScrollbar.ScrollButtonsVisible = false;
            };
        }