use of com.twosigma.beakerx.chart.xychart.plotitem.Bars in project beakerx by twosigma.
the class PlotObjectSerializerTest method serializeXYGraphics_returnTrue.
@Test
public void serializeXYGraphics_returnTrue() throws Exception {
Bars obj = new Bars();
obj.setX(Arrays.asList(10, 20));
obj.setY(Arrays.asList(10, 20));
obj.setDisplayName("test display name");
// when
boolean result = plotObjectSerializer.writeObject(obj, jgen, true);
// then
Assertions.assertThat(result).isTrue();
}
use of com.twosigma.beakerx.chart.xychart.plotitem.Bars in project beakerx by twosigma.
the class BarsSerializerTest method initTestStubData.
@Before
public void initTestStubData() throws IOException {
sw = new StringWriter();
jgen = mapper.getJsonFactory().createJsonGenerator(sw);
bars = new Bars();
bars.setX(Arrays.asList(1, 2));
bars.setY(Arrays.asList(1, 2));
}
use of com.twosigma.beakerx.chart.xychart.plotitem.Bars in project beakerx by twosigma.
the class ToolTipBuilderTest method setUp.
@Before
public void setUp() throws Exception {
xyGraphics = new Bars();
xyGraphics.setX(Arrays.asList(10, 20));
xyGraphics.setY(Arrays.asList(10, 20));
xyGraphics.setBase(5);
xyGraphics.setDisplayName("test display name");
}
use of com.twosigma.beakerx.chart.xychart.plotitem.Bars in project beakerx by twosigma.
the class GraphicsActionTest method setUp.
@Before
public void setUp() throws Exception {
kernel = new KernelTest();
KernelManager.register(kernel);
xyGraphics = new Bars();
xyGraphics.setX(Arrays.asList(10, 20));
xyGraphics.setY(Arrays.asList(10, 20));
xyGraphics.setDisplayName("test display name");
actionListener = new GraphicsActionListenerStub();
}
use of com.twosigma.beakerx.chart.xychart.plotitem.Bars in project beakerx by twosigma.
the class GroovyEvaluatorChartTest method parsePlotWithBarsScript_returnPlotObjectWithBars.
@Test
public void parsePlotWithBarsScript_returnPlotObjectWithBars() {
// when
Object result = parseClassFromScript("def plot = new Plot()\n" + "plot << new Bars(x: (1..5), y: [3, 5, 2, 3, 7])");
// then
Assertions.assertThat(result instanceof Plot).isTrue();
Plot plot = (Plot) result;
Assertions.assertThat(plot.getGraphics()).isNotEmpty();
Assertions.assertThat(plot.getGraphics().get(0) instanceof Bars).isTrue();
}
Aggregations