Thursday 8 August 2019

asp.net - How to set Chart control width into percentage

In asp.net chart control, how do we set chart width into percentage, below scenario is chart width needs to be set with the panel width. As the chart takes only pixel. Help on this.







































code behind:
protected void Page_Load(object sender, EventArgs e)
{



Chart2.Series[0].Points.AddXY(1, 1);
Chart2.Series[0].Points.AddXY(1, 2);
Chart2.Series[0].Points.AddXY(2, 1);
Chart2.Series[0].Points.AddXY(2, 2);
Chart2.Series[0].Points.AddXY(3, 1);
Chart2.Series[0].Points.AddXY(3, 2);


Chart3.Series[0].Points.AddXY(1, 10);
Chart3.Series[0].Points.AddXY(1, 20);
Chart3.Series[0].Points.AddXY(2, 10);
Chart3.Series[0].Points.AddXY(2, 20);
Chart3.Series[0].Points.AddXY(3, 10);
Chart3.Series[0].Points.AddXY(3, 20);


}




enter image description here

No comments:

Post a Comment

php - file_get_contents shows unexpected output while reading a file

I want to output an inline jpg image as a base64 encoded string, however when I do this : $contents = file_get_contents($filename); print &q...