Skip to content

Commit d1d348d

Browse files
committed
Init debugging for #6
1 parent abd72da commit d1d348d

File tree

2 files changed

+62
-0
lines changed

2 files changed

+62
-0
lines changed

src/main/resources/chart.json

Lines changed: 37 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,37 @@
1+
{
2+
"type": "bar",
3+
"data": {
4+
"labels": ["Red", "Blue", "Yellow", "Green", "Purple", "Orange"],
5+
"datasets": [{
6+
"label": "# of Votes",
7+
"data": [12, 19, 3, 5, 2, 3],
8+
"backgroundColor": [
9+
"rgba(255, 99, 132, 0.2)",
10+
"rgba(54, 162, 235, 0.2)",
11+
"rgba(255, 206, 86, 0.2)",
12+
"rgba(75, 192, 192, 0.2)",
13+
"rgba(153, 102, 255, 0.2)",
14+
"rgba(255, 159, 64, 0.2)"
15+
],
16+
"borderColor": [
17+
"rgba(255,99,132,1)",
18+
"rgba(54, 162, 235, 1)",
19+
"rgba(255, 206, 86, 1)",
20+
"rgba(75, 192, 192, 1)",
21+
"rgba(153, 102, 255, 1)",
22+
"rgba(255, 159, 64, 1)"
23+
],
24+
"borderWidth": 1
25+
}]
26+
},
27+
"options": {
28+
"scales": {
29+
"yAxes": [{
30+
"ticks": {
31+
"beginAtZero":true,
32+
"padding": 25
33+
}
34+
}]
35+
}
36+
}
37+
}
Lines changed: 25 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,25 @@
1+
package be.ceau.chart.tests;
2+
3+
import java.io.IOException;
4+
import java.util.Scanner;
5+
6+
import org.junit.Test;
7+
8+
public class DeserializeTest {
9+
10+
@Test
11+
public void deserialize() {
12+
try {
13+
14+
Scanner scanner = new Scanner(getClass().getResource("/chart.json").openStream());
15+
String text = scanner.useDelimiter("\\A").next();
16+
scanner.close();
17+
18+
19+
20+
} catch (IOException e) {
21+
e.printStackTrace();
22+
}
23+
}
24+
25+
}

0 commit comments

Comments
 (0)