Added test case for 'graphOptions'

This commit is contained in:
User 2012-11-09 12:55:54 -05:00
parent c74c329c21
commit 94c56e1d10

View File

@ -69,3 +69,18 @@ test('GraphControls basics', function () {
view.remove();
});
test('Overriding graph options', function () {
var dataset = Fixture.getDataset();
var randomWidth = Math.random();
var view = new recline.View.Graph({
model: dataset,
state: {
'graphType': 'bars',
'group': 'date',
'series': ['y', 'z'],
'graphOptions': { bars: {barWidth: randomWidth}}
}
});
equal(view.getGraphOptions('bars').bars.barWidth, randomWidth)
view.remove();
});