title: How to adjust axis scales for datavisualization.charting after resizing a chart?
body: <p>I updated a chart from essentially being 72dpi, to 300dpi. This is because I am using itextsharp to add an image to my pdf and the quality was poor. So I increased the size of the image by 3X and the image does look better, but here is the problem. </p>
  
  <p>DPI has increased, but detail has become very hard to see. </p>
  
  <h2>Original Chart Image</h2>
  
  <p><img src="https://i.stack.imgur.com/Scq94.png" alt="Original Image"></p>
  
  <p><strong>Refactored Chart Image</strong>
  <img src="https://i.stack.imgur.com/ezQYd.png" alt="enter image description here"></p>
  
  <h2>Code</h2>
  
  <p>This is how I resized my chart. </p>
  
  <pre><code>private static System.Drawing.Bitmap GetChartBitmap()
          {
  
  
              System.Drawing.Rectangle targetBounds = new System.Drawing.Rectangle(0, 0, chart_runs.Width, chart_runs.Height);
              System.Drawing.Bitmap bitmap = new System.Drawing.Bitmap(targetBounds.Width, targetBounds.Height);
              bitmap.SetResolution(1000, 1000);
              chart_runs.DrawToBitmap(bitmap, targetBounds);
              bitmap.Save(@"C:\Temp\OriginalChartImage.bmp");
  
  
              System.Drawing.Bitmap bitmap3 = new System.Drawing.Bitmap(1650, 990);
              bitmap3.SetResolution(300, 300);
              chart_runs.DrawToBitmap(bitmap3, new System.Drawing.Rectangle(0, 0, 1650, 990));
              bitmap3.Save(@"C:\Temp\RefactoredChartImage.png");
  
  
  
              //This stuff below is for my code elsewhere. Using bitmap3 to be added to pdf. 
              //chart_runs.DrawToBitmap(bitmap, targetBounds);
              string path = System.IO.Path.GetTempPath();
  
              bitmap1.Save(path + @"\Image.png");
              return bitmap1;
          }
  </code></pre>
  
  <p>I have looked at the Microsoft msdn examples and haven't found anything that addresses my problem. Namely, how can I either increase the size of my labels so people can read them again. OR, is there a way for me to increase the DPI and keep the same label x and label y scale that was used in the first picture? That is, have a larger image and 300DPI, but scale 0 to 300 by 20's and not 5's like my refactored picture? </p>
  
  <h2>Attempts to fix</h2>
  
  <ul>
  <li>Scaling the axis? See <a href="http://msdn.microsoft.com/en-us/library/system.web.ui.datavisualization.charting.axis.scaleview(v=vs.110).aspx" rel="nofollow noreferrer">here</a>. I don't think this is working right. Not much success here. </li>
  <li>Been trying to find a way in Chart class to see if there is a way to specify strict scales. (20 on y scale vs 15 seconds on x scale). </li>
  <li>Most online resources are pleased just to increase the scale of the picture and walk away.  And things like this <a href="http://www.dreamincode.net/forums/topic/268656-how-to-get-chart-scale-to-resize-when-data-updated/" rel="nofollow noreferrer">here.</a></li>
  </ul>
  
  <p>I would greatly appreciate any help and assistance.  </p>