How to make C# chart with two columns per one X value? -


i need chart:

|          _ |  _      | | _ | | | _   | || | | | || |  | || | |----|-------|------      1       2 

i've tried code below, second column overlaps first.but must second column next first column

        chart.series.clear();         chart.series.add("series 1");         chart.series.add("series 2");          (int = 0; < alphabet.length; i++)         {             datapoint dp = new datapoint();             dp.axislabel = alphabet[i].tostring();             dp.yvalues = new double[] { freq[i] };              chart.series[0].points.add(dp);              dp.yvalues = new double[] { 100 };             chart.series[1].points.add(dp);         } 

the columns not aligning because using same instance of datapoint. use new instance of datapoint second series , rendered besides each other.

chart.series.clear();     chart.series.add("series 1");     chart.series.add("series 2");      (int = 0; < alphabet.length; i++)     {         datapoint dp = new datapoint();         dp.axislabel = alphabet[i].tostring();         dp.yvalues = new double[] { freq[i] };          chart.series[0].points.add(dp);            datapoint dp1 = new datapoint();         dp1.axislabel = alphabet[i].tostring();         dp1.yvalues = new double[] { 100 };         chart.series[1].points.add(dp1);     } 

Comments

Popular posts from this blog

google chrome - Developer tools - How to inspect the elements which are added momentarily (by JQuery)? -

angularjs - Showing an empty as first option in select tag -

php - Cloud9 cloud IDE and CakePHP -