Exemplo n.º 1
0
 protected void chartPreview_CustomCallback(object sender, CustomCallbackEventArgs e)
 {
     try
     {
         if (e.Parameter == this.cboAppearance.ID || e.Parameter == this.cboPalette.ID)
         {
             this.chartPreview.AppearanceName = this.cboAppearance.SelectedItem.Text;
             this.chartPreview.PaletteName    = this.cboPalette.SelectedItem.Text;
         }
         else if (e.Parameter == this.chkRotatedXY.ID)
         {
             var xyDia = this.chartPreview.Diagram as XYDiagram;
             if (this.chkRotatedXY.Checked)
             {
                 xyDia.Rotated             = true;
                 xyDia.PaneLayoutDirection = PaneLayoutDirection.Horizontal;
             }
             else
             {
                 xyDia.Rotated             = false;
                 xyDia.PaneLayoutDirection = PaneLayoutDirection.Vertical;
             }
         }
         else if (e.Parameter == this.chkShowSeriesLabel.ID)
         {
             var isChecked = this.chkShowSeriesLabel.Checked;
             foreach (SeriesBase series in this.chartPreview.Series)
             {
                 series.Label.Visible = isChecked;
             }
         }
     }
     catch { }
 }
Exemplo n.º 2
0
 protected void chart_CustomCallback(object sender, CustomCallbackEventArgs e)
 {
     if (e.Parameter == "Type")
     {
         BindingData();
     }
 }
Exemplo n.º 3
0
        protected void Mychart_CustomCallback(object sender, CustomCallbackEventArgs e)
        {
            WebChartControl chart = sender as WebChartControl;

            if (chart != null)
            {
                //chart.ToolTipController.OpenMode = GetToolTipOpenMode(toolTipOpenModes[cbOpenMode.SelectedIndex]);
                //chart.ToolTipOptions.ToolTipPosition = GetToolTipPosition(toolTipPositions[cbPosition.SelectedIndex]);
                chart.ToolTipOptions.ToolTipPosition = new ToolTipMousePosition();
            }
        }
Exemplo n.º 4
0
 protected void WebChartControl1_CustomCallback(object sender, CustomCallbackEventArgs e)
 {
     try
     {
         string[] separators = { "|" };
         var      value      = e.Parameter;
         var      words      = value.Split(separators, StringSplitOptions.RemoveEmptyEntries);
         GetGraph(words[0], Convert.ToInt32(words[1]), Convert.ToInt32(words[2]), words[3]);
     }
     catch (Exception ex)
     {
         ScriptManager.RegisterStartupScript(this, GetType(), "ErrorText", "CallError('Error: " + ex.Message + "');", true);
     }
 }
    protected void chart_CustomCallback(object sender, CustomCallbackEventArgs e)
    {
        switch (e.Parameter)
        {
        case "Palette":
            if (cbPalette != null)
            {
                webChartControl.PaletteName = cbPalette.Text;
            }
            break;

        case "Appearance":
            if (cbAppearance != null)
            {
                webChartControl.AppearanceName = cbAppearance.Text;
                if (cbPalette != null)
                {
                    cbPalette.SelectedIndex = cbPalette.Items.IndexOfText(webChartControl.PaletteName);
                }
            }
            break;
        }
    }
Exemplo n.º 6
0
 protected void chart_CustomCallback(object sender, CustomCallbackEventArgs e)
 {
     if (e.Parameter == "Type")
         BindingData();
 }
Exemplo n.º 7
0
 protected void chartPreview_CustomCallback(object sender, CustomCallbackEventArgs e)
 {
     try
     {
         if (e.Parameter == this.cboAppearance.ID || e.Parameter == this.cboPalette.ID)
         {
             this.chartPreview.AppearanceName = this.cboAppearance.SelectedItem.Text;
             this.chartPreview.PaletteName = this.cboPalette.SelectedItem.Text;
         }
         else if (e.Parameter == this.chkRotatedXY.ID)
         {
             var xyDia = this.chartPreview.Diagram as XYDiagram;
             if (this.chkRotatedXY.Checked)
             {
                 xyDia.Rotated = true;
                 xyDia.PaneLayoutDirection = PaneLayoutDirection.Horizontal;
             }
             else
             {
                 xyDia.Rotated = false;
                 xyDia.PaneLayoutDirection = PaneLayoutDirection.Vertical;
             }
         }
         else if (e.Parameter == this.chkShowSeriesLabel.ID)
         {
             var isChecked = this.chkShowSeriesLabel.Checked;
             foreach (SeriesBase series in this.chartPreview.Series)
                 series.Label.Visible = isChecked;
         }
     }
     catch { }
 }