Exemplo n.º 1
0
    public void PlaceChartInCell(DxCharts.Mychart chart, TableCell container, int chartW, int chartH, double pct_w, double pct_h)
    {
        int w = (int)(chartW * pct_w);
        int h = (int)(chartH * pct_h);

        PlaceChartInCell(chart, container, w, h);
    }
Exemplo n.º 2
0
    public static void PlaceChartInCell(DxCharts.Mychart chart, TableCell container, string empty)
    {
        Label lbl = new Label();

        lbl.Text = empty;
        container.Controls.Add(lbl);
    }
Exemplo n.º 3
0
    public static void PlaceChartInCell(DxCharts.Mychart mychart, TableCell container, int width, int height)
    {
        if (mychart.chart != null)
        {
            mychart.chart.Width  = width;
            mychart.chart.Height = height;

            string chartname = String.Format("chart{0}", Guid.NewGuid());             //System.DateTime.Now.Ticks);
            mychart.chart.ClientInstanceName = chartname;
            mychart.chart.ID = chartname;

            //Render the Checkbox here for when selecting specific charts to save.
            //container.Controls.Add(mychart.chk);
            container.Controls.Add(mychart.chart);
        }
        else
        {
            Label lbl = new Label();
            lbl.Text = (String.IsNullOrEmpty(mychart._emptymsg)) ? "empty chart" : mychart._emptymsg.Replace(Environment.NewLine, "<br/>");
            container.Controls.Add(lbl);
        }
    }