public ActionResult GetEqualizerChart(int?w, int?h)
        {
            lock (s_renderLock)
            {
                var width  = (w > 0) ? (int)w : 400;
                var height = (h > 0) ? (int)h : 300;

                var wChart2 = new Chart();

                Utils.UseCaches     = false;
                wChart2.Header.Text = "Equalizer Gauge";

                var rpTheme = new BlackIsBackTheme(wChart2);
                rpTheme.Apply();

                wChart2.Aspect.View3D = false;
                wChart2.Series.Add(new Equalizer());
                wChart2.Series[0].FillSampleValues(40);

                wChart2.Panel.Bevel.Inner = Steema.TeeChart.Drawing.BevelStyles.None;
                wChart2.Panel.Bevel.Outer = Steema.TeeChart.Drawing.BevelStyles.None;

                _tempStream2 = new MemoryStream();
                wChart2.Export.Image.PNG.Width  = width;
                wChart2.Export.Image.PNG.Height = height;

                wChart2.Export.Image.PNG.Save(_tempStream2);

                _tempStream2.Position = 0;

                return(base.File(_tempStream2, "image/png"));
            }
        }
コード例 #2
0
        public MainWindow()
        {
            InitializeComponent();

            series = new Steema.TeeChart.WPF.Styles.Line();
            tChart1.Series.Add(series);
            tChart1.Chart.Aspect.View3D = false;
            tChart1.Header.Visible      = false;
            tChart1.Legend.Visible      = false;

            series.FillSampleValues(500);

            black = new BlackIsBackTheme(tChart1.Chart);
            black.Apply();


            tool = new ScrollPager(tChart1.Chart);

            tool.Series = series;
            black       = new BlackIsBackTheme(tool.SubChartTChart.Chart);
            black.Apply();

            tool.SubChartTChart.Panel.Pen.Visible = false;
            tool.SubChartTChart.Panel.Bevel.Inner = BevelStyles.None;
            tool.SubChartTChart.Panel.Bevel.Outer = BevelStyles.None;
        }
コード例 #3
0
        private void InitializeChart(Chart tChart)
        {
            tChart.Panel.Transparent      = true;
            tChart.Header.Visible         = false;
            tChart.Axes.Left.Grid.Visible = true;
            tChart.Aspect.View3D          = false;
            tChart.Legend.Visible         = false;

            //if (App.CurrentTheme == TeeChartForWindowsPhone.App.Theme.Dark)
            //{
            BlackIsBackTheme theme = new BlackIsBackTheme(tChart.Chart);

            Steema.TeeChart.Themes.Theme.ApplyChartTheme(theme, tChart.Chart);
            Steema.TeeChart.Themes.ColorPalettes.ApplyPalette(tChart.Chart, Theme.OnBlackPalette);

            Color drawPenColor1 = Color.White;

            //backImage.Opacity = 30;
            tChart.Walls.Back.Transparency   = 40;
            tChart.Walls.Left.Transparency   = 40;
            tChart.Walls.Bottom.Transparency = 40;
            //}
            //else
            //{
            //  drawPenColor1 = Colors.Black;
            //  tChart.Walls.Back.Transparency = 95;
            //  tChart.Walls.Left.Transparency = 95;
            //  tChart.Walls.Bottom.Transparency = 95;
            //  Uri uri = new Uri("Images/teeWPbackNeg.png", UriKind.Relative);
            //  ImageSource imgSource = new System.Windows.Media.Imaging.BitmapImage(uri);
            //  backImage.ImageSource = imgSource;
            //  backImage.Opacity = 30;
            //}

            tChart.Chart.Axes.Left.Labels.Font.Color   = drawPenColor1;
            tChart.Chart.Axes.Top.Labels.Font.Color    = drawPenColor1;
            tChart.Chart.Axes.Right.Labels.Font.Color  = drawPenColor1;
            tChart.Chart.Axes.Bottom.Labels.Font.Color = drawPenColor1;
            tChart.Axes.Left.Title.Font.Color          = drawPenColor1;
            tChart.Axes.Bottom.Title.Font.Color        = drawPenColor1;

            tChart.Axes.Left.Title.Font.Size = 18;
            tChart.Axes.Left.Title.Font.Size = 18;

            tChart.Axes.Left.Labels.Font.Size   = 14;
            tChart.Axes.Bottom.Labels.Font.Size = 14;

            tChart.Chart.Legend.Font.Color = drawPenColor1;
        }