Microsoft chart with chart type is Column

163 views Asked by At

I tried to decrease space between space between columns and also wanted to decrease width of columns, but I was only able to adjust width of columns not space between columns.

enter image description here

please help for solution. I really appreciate the effort.

Code snap: `

            for (int i = 0; i < dss.Tables[1].Rows.Count; i++)
            {
                yValues[i] = Convert.ToDouble(dss.Tables[1].Rows[i]["admission"].ToString());

                if (isDateRange == 1)
                {
                    xValues[i] = dss.Tables[1].Rows[i]["mth"].ToString().Substring(0, dss.Tables[1].Rows[i]["mth"].ToString().IndexOf(" "));
                }
                else
                {
                    xValues[i] = dss.Tables[1].Rows[i]["mth"].ToString();
                }

                zValues[i] = Convert.ToDouble(dss.Tables[1].Rows[i]["readmission"].ToString());
            }

            chart1.Series[0].Points.DataBindXY(xValues, yValues);
            chart1.Series[0].ToolTip = "#AXISLABEL: #VALY";
            chart1.Series[0]["PieLabelStyle"] = "Outside";
            chart1.Series[0]["PieDrawingStyle"] = "Concave";
            chart1.Series[1].Points.DataBindXY(xValues, zValues);
            chart1.Series[1].ToolTip = "#AXISLABEL: #VALY";


            var chartArea_chart1 = chart1.ChartAreas[chart1.Series[0].ChartArea];
            // enable autoscroll
            chartArea_chart1.CursorY.AutoScroll = true;

            // let's zoom to [0,blockSize] (e.g. [0,100])
            chartArea_chart1.AxisX.ScaleView.Zoomable = true;
            chartArea_chart1.AxisX.ScaleView.SizeType = DateTimeIntervalType.Number;

            //chartArea_chart1.AxisY.ScaleView.Zoomable = true;
            //chartArea_chart1.AxisY.ScaleView.SizeType = DateTimeIntervalType.Auto;

            //chart1.Series[0].CustomProperties ="PixelPointWidth = 10";
            //chart1.Series[0].CustomProperties = "PointWidth = 0.1";

            int position = 0;
            int size = 30;
            chartArea_chart1.AxisX.ScaleView.Zoom(position, size);

            // disable zoom-reset button (only scrollbar's arrows are available)
            chartArea_chart1.AxisX.ScrollBar.ButtonStyle = ScrollBarButtonStyles.SmallScroll;`
0

There are 0 answers