0
1

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?

More than 3 years have passed since last update.

.NET Core 3.0 でのChartの取り扱い方

Last updated at Posted at 2019-11-08

まずは、以下のパッケージ(System.Windows.Forms.DataVisualization)をNuGetからインストール。
image.png
次に、コンパイル時に以下のパッケージ(System.Data.SqlClient)がないといわれるので、事前にインストール。
image.png
あとは、FormのDesigner.csにChartを配置するコードを記述するのみ。

参考元

追記:
気が付いたら、実行時にOledb.dllを参照するDataVisualization(多分、.net framework用?)を参照するようになって動作しなくなったので追記。
プロジェクトの中身(.csprojファイル)から、以下のような内容を削除。

    <ItemGroup>
      <Reference Include="System.Windows.Forms.DataVisualization, Version=4.0.0.0, Culture=neutral>
      <HintPath>System.Windows.Forms.DataVisualization.dll</HintPath>
      </Reference>
    </ItemGroup>

晴れて、SqlClientを参照するようになり、動作上問題はなくなった。
なぜこのような記述が追加されたかは不明。。。

0
1
0

Register as a new user and use Qiita more conveniently

  1. You get articles that match your needs
  2. You can efficiently read back useful information
  3. You can use dark theme
What you can do with signing up
0
1

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?