Compare commits
1 commit
main
...
format-upd
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
c7d475576c |
2 changed files with 45 additions and 15 deletions
|
|
@ -59,5 +59,32 @@ namespace QuickChartTest
|
|||
Assert.Contains("h=300", url);
|
||||
Assert.Contains("key=abc123", url);
|
||||
}
|
||||
|
||||
[Fact]
|
||||
public void TestWithFormat()
|
||||
{
|
||||
Chart qc = new Chart
|
||||
{
|
||||
Width = 500,
|
||||
Height = 300,
|
||||
Format = "svg",
|
||||
Config = @"{
|
||||
type: 'bar',
|
||||
data: {
|
||||
labels: ['Q1', 'Q2', 'Q3', 'Q4'],
|
||||
datasets: [{
|
||||
label: 'Users',
|
||||
data: [50, 60, 70, 180]
|
||||
}]
|
||||
}
|
||||
}"
|
||||
};
|
||||
|
||||
string url = qc.GetUrl();
|
||||
Assert.Contains("https://quickchart.io:443/chart", url);
|
||||
Assert.Contains("w=500", url);
|
||||
Assert.Contains("h=300", url);
|
||||
Assert.Contains("f=svg", url);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -77,6 +77,9 @@ The background color of the chart. Any valid HTML color works. Defaults to #ffff
|
|||
#### DevicePixelRatio: double
|
||||
The device pixel ratio of the chart. This will multiply the number of pixels by the value. This is usually used for retina displays. Defaults to 1.0.
|
||||
|
||||
#### Format: string
|
||||
The output format of the chart. Defaults to "png"
|
||||
|
||||
#### Key: string
|
||||
API key (not required)
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue