public override void Initialize(NThinChartControl control) { control.BackgroundStyle.FrameStyle.Visible = false; control.Panels.Clear(); // Set manual ID so that it can be referenced in JavaScript control.StateId = "Chart1"; // set a chart title NLabel header = new NLabel("Custom Requests"); header.TextStyle.FontStyle = new NFontStyle("Times New Roman", 14, FontStyle.Italic); header.TextStyle.ShadowStyle.Type = ShadowType.LinearBlur; header.ContentAlignment = ContentAlignment.BottomRight; header.DockMode = PanelDockMode.Top; header.Location = new NPointL(new NLength(3, NRelativeUnit.ParentPercentage), new NLength(2, NRelativeUnit.ParentPercentage)); control.Panels.Add(header); NCartesianChart chart = new NCartesianChart(); InitChart(control, chart); // register a custom request callback control.CustomRequestCallback = new CustomRequestCallback(); control.ServerSettings.EnableTiledZoom = true; // configure toolbar control.Toolbar.Visible = true; control.Controller.SetActivePanel(chart); // add a data zoom tool NDataZoomTool dataZoomTool = new NDataZoomTool(); dataZoomTool.Exclusive = true; dataZoomTool.Enabled = false; dataZoomTool.AllowYAxisZoom = false; control.Controller.Tools.Add(dataZoomTool); // add a data pan tool NDataPanTool dataPanTool = new NDataPanTool(); dataPanTool.Exclusive = true; dataPanTool.Enabled = true; control.Controller.Tools.Add(dataPanTool); // add a tooltip tool control.Controller.Tools.Add(new NTooltipTool()); // add a cursor change tool control.Controller.Tools.Add(new NCursorTool()); control.Toolbar.Visible = true; control.Toolbar.Items.Add(new NToolbarButton(new NSaveImageAction("Save as PNG", new NPngImageFormat(), true, new NSize(0, 0), 96))); control.Toolbar.Items.Add(new NToolbarSeparator()); control.Toolbar.Items.Add(new NToolbarButton(new NToggleDataZoomToolAction())); control.Toolbar.Items.Add(new NToolbarButton(new NToggleDataPanToolAction())); }
public override void Initialize() { base.Initialize(); // disable the legend nChartControl1.Legends[0].Mode = LegendMode.Disabled; // set a chart title NLabel title = nChartControl1.Labels.AddHeader("Axis Scroll Tool"); title.TextStyle.FontStyle = new NFontStyle("Times New Roman", 18, FontStyle.Italic); title.ContentAlignment = ContentAlignment.BottomCenter; title.Location = new NPointL(new NLength(50, NRelativeUnit.ParentPercentage), new NLength(2, NRelativeUnit.ParentPercentage)); // configure stock and volume charts ConfigureStockValuesChart(); ConfigureStockVolumesChart(); // Configure axes ConfigureAxes(); // configure cursors ConfigureAxisCursors(); // configure range selections ConfigureRangeSelections(); // add a guide line on the left NSideGuideline guideLine = new NSideGuideline(PanelSide.Left); guideLine.Targets.Add(m_ChartStockValues); guideLine.Targets.Add(m_ChartStockVolumes); nChartControl1.Document.RootPanel.Guidelines.Add(guideLine); // configure interactivity m_DataZoomTool = new NDataZoomTool(); m_DataZoomTool.AlwaysZoomIn = false; m_AxisScrollTool = new NAxisScrollTool(); nChartControl1.Controller.Tools.Add(new NPanelSelectorTool()); nChartControl1.Controller.Tools.Add(new NDataCursorTool()); nChartControl1.Controller.Tools.Add(m_AxisScrollTool); nChartControl1.Controller.Tools.Add(m_DataZoomTool); PagingViewResetModeComboBox.FillFromEnum(typeof(PagingViewResetMode)); PagingViewResetModeComboBox.SelectedIndex = 0; }
private void UpdateDataZoomTool() { if (nChartControl1 == null) { return; } nChartControl1.Controller.Tools.Clear(); NDataZoomTool dataZoomTool = new NDataZoomTool(); dataZoomTool.AnimateZooming = AnimateZoomingCheckBox.Checked; dataZoomTool.AnimationSteps = (int)AnimationStepsNumericUpDown.Value; nChartControl1.Controller.Tools.Add(new NPanelSelectorTool()); nChartControl1.Controller.Tools.Add(new NAxisScrollTool()); nChartControl1.Controller.Tools.Add(dataZoomTool); }
protected void Page_Load(object sender, EventArgs e) { NThinChartControl1.StateId = "Chart1"; if (!NThinChartControl1.Initialized) { // enable jittering (full scene antialiasing) NThinChartControl1.Settings.JitterMode = JitterMode.Enabled; NThinChartControl1.ServerSettings.EnableTiledZoom = true; NThinChartControl1.Panels.Clear(); // apply background image border NImageFrameStyle frame = new NImageFrameStyle(); frame.Type = ImageFrameType.Raised; frame.BackgroundColor = Color.White; frame.BorderStyle.Color = Color.Gainsboro; NThinChartControl1.BackgroundStyle.FrameStyle = frame; NThinChartControl1.BackgroundStyle.FillStyle = new NGradientFillStyle(Color.White, Color.GhostWhite); // set a chart title NLabel title = new NLabel("Toolbar Configuration"); NThinChartControl1.Panels.Add(title); title.DockMode = PanelDockMode.Top; title.Padding = new NMarginsL(4, 6, 4, 6); title.TextStyle.FontStyle = new NFontStyle("Times New Roman", 14, FontStyle.Italic); title.TextStyle.ShadowStyle.Type = ShadowType.LinearBlur; // configure the legend NLegend legend = new NLegend(); NThinChartControl1.Panels.Add(legend); legend.DockMode = PanelDockMode.Right; legend.Padding = new NMarginsL(1, 1, 3, 3); legend.FillStyle.SetTransparencyPercent(50); legend.OuterBottomBorderStyle.Width = new NLength(0, NGraphicsUnit.Pixel); legend.OuterLeftBorderStyle.Width = new NLength(0, NGraphicsUnit.Pixel); legend.OuterRightBorderStyle.Width = new NLength(0, NGraphicsUnit.Pixel); legend.OuterTopBorderStyle.Width = new NLength(0, NGraphicsUnit.Pixel); legend.HorizontalBorderStyle.Width = new NLength(0, NGraphicsUnit.Pixel); legend.VerticalBorderStyle.Width = new NLength(0, NGraphicsUnit.Pixel); // configure the chart NCartesianChart chart = new NCartesianChart(); NThinChartControl1.Panels.Add(chart); chart.Enable3D = true; chart.Fit3DAxisContent = true; chart.DisplayOnLegend = legend; chart.BoundsMode = BoundsMode.Fit; chart.LightModel.SetPredefinedLightModel(PredefinedLightModel.GlitterLeft); chart.Projection.SetPredefinedProjection(PredefinedProjection.Perspective1); chart.DockMode = PanelDockMode.Fill; chart.Padding = new NMarginsL( new NLength(3, NRelativeUnit.ParentPercentage), new NLength(3, NRelativeUnit.ParentPercentage), new NLength(3, NRelativeUnit.ParentPercentage), new NLength(3, NRelativeUnit.ParentPercentage)); chart.Wall(ChartWallType.Back).FillStyle = new NGradientFillStyle(Color.White, Color.Gray); // setup the X axis NAxis axisX = chart.Axis(StandardAxis.PrimaryX); axisX.ScrollBar.Visible = true; NOrdinalScaleConfigurator scaleX = (NOrdinalScaleConfigurator)axisX.ScaleConfigurator; scaleX.MajorTickMode = MajorTickMode.AutoMaxCount; scaleX.AutoLabels = false; // add interlaced stripe for the Y axis NAxis axisY = chart.Axis(StandardAxis.PrimaryY); axisY.ScrollBar.Visible = true; NLinearScaleConfigurator scaleY = (NLinearScaleConfigurator)axisY.ScaleConfigurator; NScaleStripStyle stripStyle = new NScaleStripStyle(new NColorFillStyle(Color.Beige), null, true, 0, 0, 1, 1); stripStyle.ShowAtWalls = new ChartWallType[] { ChartWallType.Back, ChartWallType.Left }; scaleY.StripStyles.Add(stripStyle); // hide the depth axis chart.Axis(StandardAxis.Depth).Visible = false; // add a bar series and fill it with data NBarSeries bar = (NBarSeries)chart.Series.Add(SeriesType.Bar); bar.Name = "Simple Bar Chart"; bar.BarShape = BarShape.SmoothEdgeBar; bar.Legend.Mode = SeriesLegendMode.DataPoints; bar.Legend.TextStyle.FontStyle.EmSize = new NLength(8, NGraphicsUnit.Point); bar.DataLabelStyle.Visible = false; AddDataPoint(scaleX, bar, 16, "Spain", @"http://en.wikipedia.org/wiki/Spain"); AddDataPoint(scaleX, bar, 42, "France", @"http://en.wikipedia.org/wiki/France"); AddDataPoint(scaleX, bar, 56, "Germany", @"http://en.wikipedia.org/wiki/Germany"); AddDataPoint(scaleX, bar, 23, "Italy", @"http://en.wikipedia.org/wiki/Italy"); AddDataPoint(scaleX, bar, 47, "UK", @"http://en.wikipedia.org/wiki/UK"); AddDataPoint(scaleX, bar, 38, "Sweden", @"http://en.wikipedia.org/wiki/Sweden"); // add the index of the bar to highlight NThinChartControl1.CustomData = 0; // apply style sheet NStyleSheet styleSheet = NStyleSheet.CreatePredefinedStyleSheet(PredefinedStyleSheet.FreshMultiColor); styleSheet.Apply(bar); // configure toolbar NThinChartControl1.Toolbar.Visible = true; NThinChartControl1.Controller.SetActivePanel(chart); NThinChartControl1.AutoUpdateCallback = new NAutoUpdateCallback(); //NThinChartControl1.Controller.EnableAutoUpdate = true; NTrackballTool tbt = new NTrackballTool(); tbt.Exclusive = true; tbt.Enabled = true; NThinChartControl1.Controller.Tools.Add(tbt); // add a data zoom tool NDataZoomTool dataZoomTool = new NDataZoomTool(); dataZoomTool.Exclusive = true; dataZoomTool.Enabled = false; NThinChartControl1.Controller.Tools.Add(dataZoomTool); // add a data pan tool NDataPanTool dataPanTool = new NDataPanTool(); dataPanTool.Exclusive = true; dataPanTool.Enabled = false; NThinChartControl1.Controller.Tools.Add(dataPanTool); // add a tooltip tool NThinChartControl1.Controller.Tools.Add(new NTooltipTool()); // add a cursor change tool NThinChartControl1.Controller.Tools.Add(new NCursorTool()); // add a browser redirect tool NThinChartControl1.Controller.Tools.Add(new NBrowserRedirectTool()); NThinChartControl1.Toolbar.Visible = true; NThinChartControl1.Toolbar.Items.Add(new NToolbarButton(new NSaveStateAction())); NThinChartControl1.Toolbar.Items.Add(new NToolbarButton(new NSaveImageAction("Save as PDF", new NPdfImageFormat(), true, new NSize(), 300))); NThinChartControl1.Toolbar.Items.Add(new NToolbarButton(new NSaveImageAction("Save as SVG", new NSvgImageFormat(), true, new NSize(), 96))); NThinChartControl1.Toolbar.Items.Add(new NToolbarButton(new NSaveImageAction("Save as XAML", new NXamlImageFormat(), true, new NSize(), 96))); NSaveImageAction sia = new NSaveImageAction("Bitmap.bmp", new NBitmapImageFormat(), true, new NSize(), 96); sia.Tooltip = "Print or Save as Bitmap"; NThinChartControl1.Toolbar.Items.Add(new NToolbarButton(sia)); NThinChartControl1.Toolbar.Items.Add(new NToolbarSeparator()); NThinChartControl1.Toolbar.Items.Add(new NToolbarButton(new NTogglePanelSelectorToolAction())); NThinChartControl1.Toolbar.Items.Add(new NToolbarButton(new NToggleDataZoomToolAction())); NThinChartControl1.Toolbar.Items.Add(new NToolbarButton(new NToggleDataPanToolAction())); NThinChartControl1.Toolbar.Items.Add(new NToolbarButton(new NToggleTrackballToolAction())); NThinChartControl1.Toolbar.Items.Add(new NToolbarSeparator()); NThinChartControl1.Toolbar.Items.Add(new NToolbarButton(new NToggleAutoUpdateAction())); NThinChartControl1.Toolbar.Items.Add(new NToolbarButton(new NToggleChart3DAction())); NThinChartControl1.Toolbar.Items.Add(new NToolbarButton(new NToggleChartLightingAction())); NThinChartControl1.Toolbar.Items.Add(new NToolbarSeparator()); NThinChartControl1.Toolbar.Items.Add(new NToolbarButton(new NToggleTooltipToolAction())); NThinChartControl1.Toolbar.Items.Add(new NToolbarButton(new NToggleBrowserRedirectToolAction())); NThinChartControl1.Toolbar.Items.Add(new NToolbarButton(new NToggleCursorToolAction())); NThinChartControl1.Toolbar.Items.Add(new NToolbarSeparator()); NThinChartControl1.Toolbar.Items.Add(new NToolbarButton(new ShowDataLabelsAction())); NThinChartControl1.Toolbar.Items.Add(new NToolbarButton(new HideDataLabelsAction())); NThinChartControl1.CustomRequestCallback = new CustomRequestCallback(); } }
protected void Page_Load(object sender, EventArgs e) { if (!NThinChartControl1.Initialized) { // enable jittering (full scene antialiasing) NThinChartControl1.Settings.JitterMode = JitterMode.Enabled; NThinChartControl1.BackgroundStyle.FrameStyle.Visible = false; NThinChartControl1.Panels.Clear(); // add header NLabel header = NThinChartControl1.Labels.AddHeader("General Thin Web Functionality"); header.TextStyle.FontStyle = new NFontStyle("Times New Roman", 14, FontStyle.Italic); header.TextStyle.ShadowStyle.Type = ShadowType.LinearBlur; header.Margins = new NMarginsL(10, 10, 10, 10); header.DockMode = PanelDockMode.Top; NChart chart = new NCartesianChart(); NThinChartControl1.Panels.Add(chart); chart.BoundsMode = BoundsMode.Stretch; chart.DockMode = PanelDockMode.Fill; chart.Margins = new NMarginsL(10, 0, 10, 10); // setup X axis NRangeTimelineScaleConfigurator scaleX = new NRangeTimelineScaleConfigurator(); // set configurator chart.Axis(StandardAxis.PrimaryX).ScaleConfigurator = scaleX; // enable the scrollbar chart.Axis(StandardAxis.PrimaryX).ScrollBar.Visible = true; // setup primary Y axis NAxis axis = chart.Axis(StandardAxis.PrimaryY); NLinearScaleConfigurator scaleY = (NLinearScaleConfigurator)axis.ScaleConfigurator; // add interlace stripe NScaleStripStyle stripStyle = new NScaleStripStyle(new NColorFillStyle(Color.Beige), null, true, 0, 0, 1, 1); stripStyle.Interlaced = true; stripStyle.SetShowAtWall(ChartWallType.Back, true); stripStyle.SetShowAtWall(ChartWallType.Left, true); scaleY.StripStyles.Add(stripStyle); // line series for the function NLineSeries line = (NLineSeries)chart.Series.Add(SeriesType.Line); line.DataLabelStyle.Visible = false; line.BorderStyle.Color = Color.Red; line.BorderStyle.Width = new NLength(2, NGraphicsUnit.Pixel); line.UseXValues = true; Color customColor = Color.FromArgb(100, 100, 150); // setup the stock series NStockSeries stock = (NStockSeries)chart.Series.Add(SeriesType.Stock); stock.DataLabelStyle.Visible = false; stock.CandleStyle = CandleStyle.Bar; stock.CandleWidth = new NLength(1, NRelativeUnit.ParentPercentage); stock.HighLowStrokeStyle.Color = customColor; stock.UpStrokeStyle.Color = customColor; stock.DownStrokeStyle.Color = customColor; stock.UpFillStyle = new NColorFillStyle(Color.White); stock.DownFillStyle = new NColorFillStyle(customColor); stock.OpenValues.Name = "open"; stock.HighValues.Name = "high"; stock.LowValues.Name = "low"; stock.CloseValues.Name = "close"; stock.UseXValues = true; GenerateData(stock); NFunctionCalculator functionCalculator = new NFunctionCalculator(); BuildExpression(functionCalculator, stock, line); line.XValues = (NDataSeriesDouble)stock.XValues.Clone(); line.Values = functionCalculator.Calculate(); NThinChartControl1.ServerSettings.EnableTiledZoom = true; // configure toolbar NThinChartControl1.Toolbar.Visible = true; NThinChartControl1.Controller.SetActivePanel(chart); // add a data zoom tool NDataZoomTool dataZoomTool = new NDataZoomTool(); dataZoomTool.Exclusive = true; dataZoomTool.Enabled = true; dataZoomTool.AllowYAxisZoom = false; NThinChartControl1.Controller.Tools.Add(dataZoomTool); // add a data pan tool NDataPanTool dataPanTool = new NDataPanTool(); dataPanTool.Exclusive = true; dataPanTool.Enabled = false; NThinChartControl1.Controller.Tools.Add(dataPanTool); // add a tooltip tool NThinChartControl1.Controller.Tools.Add(new NTooltipTool()); // add a cursor change tool NThinChartControl1.Controller.Tools.Add(new NCursorTool()); NThinChartControl1.Toolbar.Visible = true; NThinChartControl1.Toolbar.Items.Add(new NToolbarButton(new NSaveImageAction("Save as PNG", new NPngImageFormat(), true, new NSize(0, 0), 96))); NThinChartControl1.Toolbar.Items.Add(new NToolbarSeparator()); NThinChartControl1.Toolbar.Items.Add(new NToolbarButton(new NToggleDataZoomToolAction())); NThinChartControl1.Toolbar.Items.Add(new NToolbarButton(new NToggleDataPanToolAction())); } }
protected void Page_Load(object sender, EventArgs e) { if (!NThinChartControl1.Initialized) { NThinChartControl1.BackgroundStyle.FrameStyle.Visible = false; // set a chart title NLabel title = NThinChartControl1.Labels.AddHeader("Data Zoom Tool"); title.TextStyle.FontStyle = new NFontStyle("Times New Roman", 14, FontStyle.Italic); title.TextStyle.ShadowStyle.Type = ShadowType.LinearBlur; NThinChartControl1.ServerSettings.JQuery.SourceType = JQuerySourceType.Url; // no legend NThinChartControl1.Legends.Clear(); // setup chart NChart chart = NThinChartControl1.Charts[0]; chart.BoundsMode = BoundsMode.Stretch; // setup Y axis NLinearScaleConfigurator scaleY = (NLinearScaleConfigurator)chart.Axis(StandardAxis.PrimaryY).ScaleConfigurator; scaleY.MajorGridStyle.LineStyle.Pattern = LinePattern.Dot; // add interlace stripe NScaleStripStyle stripStyle = new NScaleStripStyle(new NColorFillStyle(Color.Beige), null, true, 0, 0, 1, 1); stripStyle.Interlaced = true; stripStyle.SetShowAtWall(ChartWallType.Back, true); stripStyle.SetShowAtWall(ChartWallType.Left, true); scaleY.StripStyles.Add(stripStyle); // setup X axis NLinearScaleConfigurator scaleX = new NLinearScaleConfigurator(); scaleX.MajorGridStyle.ShowAtWalls = new ChartWallType[] { ChartWallType.Floor, ChartWallType.Back }; scaleX.MajorGridStyle.LineStyle.Pattern = LinePattern.Dot; chart.Axis(StandardAxis.PrimaryX).ScaleConfigurator = scaleX; // setup point series NPointSeries point = (NPointSeries)chart.Series.Add(SeriesType.Point); point.Name = "Point1"; point.DataLabelStyle.Visible = false; point.FillStyle = new NColorFillStyle(Color.FromArgb(160, DarkOrange)); point.BorderStyle.Width = new NLength(0); point.Size = new NLength(2, NRelativeUnit.ParentPercentage); point.PointShape = PointShape.Ellipse; // instruct the point series to use custom X values point.UseXValues = true; // generate some random X values GenerateXYData(point); // apply layout ApplyLayoutTemplate(0, NThinChartControl1, chart, title, null); NThinChartControl1.Controller.SetActivePanel(chart); NThinChartControl1.Controller.Tools.Add(new NDataZoomTool()); NThinChartControl1.Controller.Tools.Add(new NTooltipTool()); } // configure the scrollbars and tiling NThinChartControl1.ServerSettings.EnableTiledZoom = UseTilingCheckBox.Checked; NThinChartControl1.ServerSettings.TileCacheSize = 3000; NChart chart1 = NThinChartControl1.Charts[0]; NDataZoomTool dzt = (NDataZoomTool)NThinChartControl1.Controller.Tools.FindToolOfType(typeof(NDataZoomTool)); dzt.ZoomOutResetsAxes = ZoomOutResetsAxesCheckBox.Checked; chart1.Axis(StandardAxis.PrimaryX).ScrollBar.Visible = ShowScrollbarsCheckBox.Checked; chart1.Axis(StandardAxis.PrimaryY).ScrollBar.Visible = ShowScrollbarsCheckBox.Checked; }
public NDataZoomToolUC() { InitializeComponent(); m_DataZoomTool = new NDataZoomTool(); }
protected void Page_Load(object sender, EventArgs e) { if (!NThinChartControl1.Initialized) { NThinChartControl1.BackgroundStyle.FrameStyle.Visible = false; NThinChartControl1.BackgroundStyle.FillStyle = new NColorFillStyle(Color.FromArgb(244, 244, 244)); // set a chart title NLabel title = NThinChartControl1.Labels.AddHeader("CSS Customization"); title.TextStyle.TextFormat = GraphicsCore.TextFormat.XML; title.TextStyle.FontStyle = new NFontStyle("Times New Roman", 14, FontStyle.Italic); title.TextStyle.ShadowStyle.Type = ShadowType.LinearBlur; // no legend NThinChartControl1.Legends.Clear(); // setup chart NChart chart = NThinChartControl1.Charts[0]; chart.BoundsMode = BoundsMode.Stretch; chart.Axis(StandardAxis.PrimaryX).ScrollBar.Visible = true; chart.Axis(StandardAxis.PrimaryY).ScrollBar.Visible = true; // setup Y axis NLinearScaleConfigurator scaleY = (NLinearScaleConfigurator)chart.Axis(StandardAxis.PrimaryY).ScaleConfigurator; scaleY.MajorGridStyle.LineStyle.Pattern = LinePattern.Dot; // add interlace stripe NScaleStripStyle stripStyle = new NScaleStripStyle(new NColorFillStyle(Color.Beige), null, true, 0, 0, 1, 1); stripStyle.Interlaced = true; stripStyle.SetShowAtWall(ChartWallType.Back, true); stripStyle.SetShowAtWall(ChartWallType.Left, true); scaleY.StripStyles.Add(stripStyle); scaleY.RoundToTickMax = false; scaleY.RoundToTickMin = false; // setup X axis NLinearScaleConfigurator scaleX = new NLinearScaleConfigurator(); scaleX.MajorGridStyle.ShowAtWalls = new ChartWallType[] { ChartWallType.Floor, ChartWallType.Back }; scaleX.MajorGridStyle.LineStyle.Pattern = LinePattern.Dot; scaleX.RoundToTickMax = false; scaleX.RoundToTickMin = false; chart.Axis(StandardAxis.PrimaryX).ScaleConfigurator = scaleX; // setup point series NPointSeries point = (NPointSeries)chart.Series.Add(SeriesType.Point); point.Name = "Point1"; point.DataLabelStyle.Visible = false; point.FillStyle = new NColorFillStyle(Color.FromArgb(160, DarkOrange)); point.BorderStyle.Width = new NLength(0); point.Size = new NLength(2, NRelativeUnit.ParentPercentage); point.PointShape = PointShape.Ellipse; // instruct the point series to use custom X values point.UseXValues = true; // generate some random X values GenerateXYData(point); NThinChartControl1.RecalcLayout(); chart.Axis(StandardAxis.PrimaryX).PagingView.ZoomIn(new NRange1DD(-0.5, 0.5), 0.0001); chart.Axis(StandardAxis.PrimaryY).PagingView.ZoomIn(new NRange1DD(-0.5, 0.5), 0.0001); // apply layout ApplyLayoutTemplate(0, NThinChartControl1, chart, title, null); NThinChartControl1.ServerSettings.EnableTiledZoom = true; NThinChartControl1.Controller.SetActivePanel(chart); // configure tools NThinChartControl1.Controller.Tools.Clear(); NDataPanTool dataPanTool = new NDataPanTool(); dataPanTool.Exclusive = true; dataPanTool.Enabled = true; NThinChartControl1.Controller.Tools.Add(dataPanTool); NDataZoomTool dataZoomTool = new NDataZoomTool(); dataZoomTool.Exclusive = true; dataZoomTool.Enabled = false; NThinChartControl1.Controller.Tools.Add(dataZoomTool); NThinChartControl1.Controller.Tools.Add(new NTooltipTool()); NThinChartControl1.Controller.Tools.Add(new NCursorTool()); NThinChartControl1.Toolbar.Visible = true; NThinChartControl1.Toolbar.Items.Add(new NToolbarButton(new NToggleDataZoomToolAction())); NThinChartControl1.Toolbar.Items.Add(new NToolbarButton(new NToggleDataPanToolAction())); NThinChartControl1.Toolbar.Items.Add(new NToolbarSeparator()); NThinChartControl1.Toolbar.Items.Add(new NToolbarButton(new NToggleTooltipToolAction())); NThinChartControl1.Toolbar.Items.Add(new NToolbarButton(new NToggleCursorToolAction())); // show loader images NThinChartControl1.ServerSettings.ShowLoaderImagesForAxisTiles = true; NThinChartControl1.ServerSettings.ShowLoaderImagesForPlotTiles = true; // customize the CSS NThinChartControl1.ServerSettings.Css.StatePressed = @"border: 1px solid rgb(255, 0, 0); background: rgb(252, 226, 203);"; NThinChartControl1.ServerSettings.Css.StateHover = @"border: 1px solid rgb(178, 0, 0); background: rgb(255, 255, 255);"; NThinChartControl1.ServerSettings.Css.StateDefault = @"margin: 0px; padding: 2px; border : 1px solid rgb(200, 200, 200); background: rgb(255, 255, 255);"; NThinChartControl1.ServerSettings.Css.ToolbarSeparator = @"width: 10px; height: 22px; font-size : 0px; background-color: rgb(255, 255, 255);"; NThinChartControl1.ServerSettings.Css.View = @"margin-left: 0px; margin-right: 0px; margin-top: 1px; margin-bottom: 0px; padding: 0px; border : 1px solid rgb(204, 204, 204);"; NThinChartControl1.ServerSettings.Css.Scrollbar = @"margin : 0px; padding : 0px; border : 1px solid rgb(204, 204, 204); background: rgb(255, 255, 255);"; // reflects view css margin + padding + border inflate NThinChartControl1.ServerSettings.Css.ViewInflate = new NSize(2, 3); // switch to JQuery 1.6.1 NThinChartControl1.ServerSettings.JQuery.SourceType = JQuerySourceType.Url; NThinChartControl1.ServerSettings.JQuery.Url = @"http://ajax.googleapis.com/ajax/libs/jquery/1.6.1/jquery.min.js"; } }