Tell me more ×
Stack Overflow is a question and answer site for professional and enthusiast programmers. It's 100% free, no registration required.

I have using asp.net chart in my application. Here, I would like to display StackedBar chart with the value of x-axis and y-axis. Note that here, value on both axis would be string. Value may be like as below:

Container-No.               Destination
    X001                      City-X
    X002                      City-S
    X003                      City-R

Here, Container No display on Y-axis and Destination on X-axis, and graph would be stackedBar.

Have any solution ?

share|improve this question

1 Answer

Try following

string[] yValues = { "X001","X002","X003" };
string[] xValues = { "City-X","City-S","City-R"};
Chart2.Series["Series1"].Points.DataBindXY(xValues, yValues);
share|improve this answer
Hi Rohit, got error from code , error like as below: "Y values cannot be data bound to the string object. Parameter name: yValues " Please, check above error and please, post answer after proper checking or give special instruction if have for configuration required for that. – Himanshu kamothi Jun 14 at 11:56

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.