Quantcast
Channel: SharePoint 2013 - Development and Programming forum
Viewing all articles
Browse latest Browse all 7589

Chart control data points not visible - Visual WebPart

$
0
0

Hi,

I have created a Chart control based visual webpart. I have used custom labels for both x and y axis.The problem - when i am trying to plot xy values, it is not visible on the chart.

Code

    chart1.Series["Series1"].ChartType=SeriesChartType.Bar;
    chart1.Series["Series1"]["PointWidth"]="0.6";foreach(string x in axisXValues){
         clabelX =newCustomLabel(xpos, xpos +1, x,0,LabelMarkStyle.None);
         chart1.ChartAreas[0].AxisX.CustomLabels.Add(clabelX);
         xpos++;}foreach(DataRow r in dt.Rows){string c=r[0].ToString();string s=r[1].ToString();
        chart1.Series["Series1"].Points.AddXY(c,s);}

Thanks,

Thomas


Viewing all articles
Browse latest Browse all 7589

Trending Articles



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