Turns out there is no option to change what color shows up in the negative region. There is an option to change the opacity so when the areas are stacked the colors change color. Would changing the opacity be enough to work for you?
Here what I used to experiment with changing the color conditionally, but it changes the series color.
Code:
/**
* Use $wnd to access js objects outside the gwt sandbox
*/
private native void drawChartJsni(Element renderToEl) /*-{
$wnd.Ext.create('Ext.chart.CartesianChart', {
renderTo : renderToEl,
width : 600,
height : 200,
store : {
fields : [ 'name', 'g1', 'g2' ],
data : [ {
"name" : "Item-0",
"g1" : -57,
"g2" : -59
}, {
"name" : "Item-1",
"g1" : 45,
"g2" : -50
}, {
"name" : "Item-2",
"g1" : 67,
"g2" : 43
}, {
"name" : "Item-3",
"g1" : -45,
"g2" : -18
}, {
"name" : "Item-4",
"g1" : 30,
"g2" : 90
} ]
},
legend : {
docked : 'right'
},
axes : [ {
type : 'numeric',
position : 'left',
grid : true
}, {
type : 'category',
position : 'bottom'
} ],
series : [ {
type : 'area',
xField : 'name',
yField : [ 'g1', 'g2' ],
title : [ 'G1', 'G2' ],
renderer: function (sprite, config, rendererData, index) {
var item = rendererData.store.getData().items[index];
if (sprite._field === 'g1') {
var value = item.data.g1;
if (value < 0) {
sprite.setAttributes({
fillStyle: 'red',
});
}
} else if (sprite._field === 'g2') {
var value = item.data.g2;
if (value < 0) {
}
}
}
} ]
});
}-*/;
Screen Shot 2018-01-08 at 3.34.37 PM.png