Quantcast
Channel: ASP.NET AJAX + Ajax Control Toolkit (ACT)
Viewing all articles
Browse latest Browse all 5678

Border barchart overflow

$
0
0

Hello, I'm using AjaxKitTools for BarChart and c# to fill the data. But the border of the BarChart it's overflow, I don't know how to control the Width of this.

https://prntscr.com/11t2iau

ASPX:

<div class="center2" style="overflow:auto"><ajaxToolkit:BarChart ID="BarChart1" runat="server" 
    chartheight="350" BaseLineColor="#A156AB"
    ChartType="Column" ChartTitleColor="#0E426C" Visible = "false" 
    BackColor="Transparent"
    CategoryAxisLineColor="#D08AD9" ValueAxisLineColor="#D08AD9" ></ajaxToolkit:BarChart></div>

C#

DataTable dt = GetData(query);

            string[] x = new string[dt.Rows.Count];
            decimal[] y = new decimal[dt.Rows.Count];
            for (int i = 0; i < dt.Rows.Count; i++)
            {
                x[i] = dt.Rows[i][0].ToString();
                y[i] = Convert.ToInt32(dt.Rows[i][1]);
            }
            BarChart1.Series.Add(new AjaxControlToolkit.BarChartSeries { Data = y, BarColor = "#088da5" });
            BarChart1.CategoriesAxis = string.Join(",", x);
            BarChart1.ChartTitle = string.Format("{0} Order Distribution", ddlCountries.SelectedItem.Value);
            if (x.Length > 3)
            {
                BarChart1.ChartWidth = (x.Length * 100).ToString();
            }
            BarChart1.Visible = ddlCountries.SelectedItem.Value != "";


Viewing all articles
Browse latest Browse all 5678

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>