use of com.vaadin.flow.component.charts.model.Inactive in project flow-components by vaadin.
the class ConfigurationJSONSerializationTest method configurationJSONSerialization_setOptionsWithInactiveState_inactiveStatesSerialized.
@Test
public void configurationJSONSerialization_setOptionsWithInactiveState_inactiveStatesSerialized() {
Configuration conf = new Configuration();
PlotOptionsPie options = new PlotOptionsPie();
States states = options.getStates();
Inactive inactive = states.getInactive();
inactive.setOpacity(1.0);
inactive.setBorderColor(new SolidColor("#000000"));
inactive.setColor(new SolidColor("#808080"));
inactive.setAnimation(false);
conf.setPlotOptions(options);
assertEquals("{\"chart\":{\"styledMode\":false},\"plotOptions\":{\"pie\":{\"states\":{\"inactive\":{\"animation\":false,\"borderColor\":\"#000000\",\"color\":\"#808080\",\"opacity\":1.0}}}},\"series\":[],\"exporting\":{\"enabled\":false}}", toJSON(conf));
}
Aggregations