Search in sources :

Example 16 with CategoryBars

use of com.twosigma.beakerx.chart.categoryplot.plotitem.CategoryBars in project beakerx by twosigma.

the class CategoryPlotTest method shouldSendCommMsgWhenAddCategoryBarsByLeftShift.

@Test
public void shouldSendCommMsgWhenAddCategoryBarsByLeftShift() throws Exception {
    // given
    CategoryPlot plot = createWidget();
    CategoryBars graphics = new CategoryBars();
    // when
    plot.leftShift(graphics);
    // then
    assertThat(plot.getGraphics().get(0)).isEqualTo(graphics);
    List valueAsArray = getValueAsArray(CategoryPlotSerializer.GRAPHICS_LIST);
    assertThat(valueAsArray).isNotEmpty();
}
Also used : CategoryBars(com.twosigma.beakerx.chart.categoryplot.plotitem.CategoryBars) ArrayList(java.util.ArrayList) List(java.util.List) Test(org.junit.Test) AbstractChartTest(com.twosigma.beakerx.chart.AbstractChartTest)

Aggregations

CategoryBars (com.twosigma.beakerx.chart.categoryplot.plotitem.CategoryBars)16 Test (org.junit.Test)14 JsonNode (com.fasterxml.jackson.databind.JsonNode)12 DefaultSerializerProvider (com.fasterxml.jackson.databind.ser.DefaultSerializerProvider)12 ArrayNode (com.fasterxml.jackson.databind.node.ArrayNode)6 CategoryPlot (com.twosigma.beakerx.chart.categoryplot.CategoryPlot)3 CategoryPoints (com.twosigma.beakerx.chart.categoryplot.plotitem.CategoryPoints)2 Before (org.junit.Before)2 KernelTest (com.twosigma.beakerx.KernelTest)1 AbstractChartTest (com.twosigma.beakerx.chart.AbstractChartTest)1 CategoryLines (com.twosigma.beakerx.chart.categoryplot.plotitem.CategoryLines)1 CategoryStems (com.twosigma.beakerx.chart.categoryplot.plotitem.CategoryStems)1 ArrayList (java.util.ArrayList)1 List (java.util.List)1