Skip to content

Commit

Permalink
Test for debugging #11
Browse files Browse the repository at this point in the history
  • Loading branch information
mdewilde committed Nov 14, 2017
1 parent 8be60a7 commit 58fb914
Showing 1 changed file with 48 additions and 0 deletions.
48 changes: 48 additions & 0 deletions src/test/java/be/ceau/chart/tests/TypelessLinearScaleTest.java
Original file line number Diff line number Diff line change
@@ -0,0 +1,48 @@
package be.ceau.chart.tests;

import java.io.IOException;

import org.junit.Test;

import be.ceau.chart.LineChart;
import be.ceau.chart.data.LineData;
import be.ceau.chart.dataset.LineDataset;
import be.ceau.chart.enums.FontStyle;
import be.ceau.chart.options.LineOptions;
import be.ceau.chart.options.scales.LinearScale;
import be.ceau.chart.options.scales.LinearScales;
import be.ceau.chart.options.ticks.LinearTicks;
import be.ceau.chart.tests.util.Opener;

/*
* Debugging for https://github.com/mdewilde/chart/issues/11
*/
public class TypelessLinearScaleTest {

@Test
public void typelessLinearScaleTest() throws IOException {

LineDataset dataset = new LineDataset()
.setLabel("typelessLinearScaleTest")
.addData(65)
.addData(59)
.addData(80)
.setBorderWidth(1);

LineData data = LineChart.data()
.addLabel("January")
.addLabel("February")
.addLabel("March")
.addDataset(dataset);

LinearTicks ticks = new LinearTicks().setFontStyle(FontStyle.BOLD);
LinearScale axis = new LinearScale().setTicks(ticks);
LinearScales scales = new LinearScales().addxAxis(axis);
LineOptions options = new LineOptions().setScales(scales);

Opener.inBrowser(new LineChart(data, options));

}


}

0 comments on commit 58fb914

Please sign in to comment.