Change chart size for dot net Core 5

greg chu 116 Reputation points

I setup a win form project on dot net Core 5, and successfully draw a candlestick chart, but the size of the chart is too small (see attachments), and not really visible, some one please download the code and run it and let me know how to change the size of the chart so it is visible, dot net Core 5 no longer support chart control, so only can change in code.


Please install the following 2 Nuget packages



An object-oriented and type-safe programming language that has its roots in the C family of languages and includes support for component-oriented programming.
10,481 questions
{count} votes

Accepted answer
  1. Timon Yang-MSFT 9,576 Reputation points

    I did a test. We can use this.chart1.Size = new Size(300, 100); to modify the size of the chart.

    But I checked your code, you wrote this code twice:

            this.chart1.Size = new System.Drawing.Size(300, 100);  
            this.chart1.TabIndex = 0;  
            this.chart1.Text = "chart1";  
            this.chart1.Size = new System.Drawing.Size(353, 428);  

    Is the second one redundant? Did you only modify the first one?

    If the response is helpful, please click "Accept Answer" and upvote it.
    Note: Please follow the steps in our documentation to enable e-mail notifications if you want to receive the related email notification for this thread.

0 additional answers

Sort by: Most helpful