Initial commit
This commit is contained in:
commit
79649a1628
8 changed files with 681 additions and 0 deletions
28
QuickChartExamples/ToFile.cs
Normal file
28
QuickChartExamples/ToFile.cs
Normal file
|
|
@ -0,0 +1,28 @@
|
|||
using System;
|
||||
using QuickChart;
|
||||
|
||||
namespace QuickChartExamples
|
||||
{
|
||||
public class ToFileExample
|
||||
{
|
||||
static void Main(string[] args) {
|
||||
Console.WriteLine("Saving to disk...");
|
||||
Chart qc = new Chart();
|
||||
|
||||
qc.Width = 500;
|
||||
qc.Height = 300;
|
||||
qc.Config = @"{
|
||||
type: 'bar',
|
||||
data: {
|
||||
labels: ['Q1', 'Q2', 'Q3', 'Q4'],
|
||||
datasets: [{
|
||||
label: 'Users',
|
||||
data: [50, 60, 70, 180]
|
||||
}]
|
||||
}
|
||||
}";
|
||||
|
||||
qc.ToFile("/tmp/chart.png");
|
||||
}
|
||||
}
|
||||
}
|
||||
Loading…
Add table
Add a link
Reference in a new issue