PDA

View Full Version : [INFOREQ] ST 2.1 RC 2 docs - Line series example has highlighting which doesn't work



jep
24 Oct 2012, 10:52 AM
In the ST 2.1 RC2 docs for Ext.chart.series.Line, it refers to a "highlight" config option that appears to do nothing. The whole highlighting situation is pretty murky in the docs.

mitchellsimoens
24 Oct 2012, 11:49 AM
I don't see a config item for this. Can you please define where it's at?

jep
24 Oct 2012, 11:53 AM
That's my whole point. The example is using something that I don't think even works. Here's the example on the Ext.chart.series.Line page:



var store = new Ext.data.JsonStore({
fields: ['name', 'data1', 'data2', 'data3', 'data4', 'data5'],
data: [
{'name':'metric one', 'data1':10, 'data2':12, 'data3':14, 'data4':8, 'data5':13},
{'name':'metric two', 'data1':7, 'data2':8, 'data3':16, 'data4':10, 'data5':3},
{'name':'metric three', 'data1':5, 'data2':2, 'data3':14, 'data4':12, 'data5':7},
{'name':'metric four', 'data1':2, 'data2':14, 'data3':6, 'data4':1, 'data5':23},
{'name':'metric five', 'data1':27, 'data2':38, 'data3':36, 'data4':13, 'data5':33}
]
});

var lineChart = new Ext.chart.CartesianChart({
animate: true,
store: store,
axes: [{
type: 'numeric',
position: 'left',
fields: ['data1'],
title: {
text: 'Sample Values',
fontSize: 15
},
grid: true,
minimum: 0
}, {
type: 'category',
position: 'bottom',
fields: ['name'],
title: {
text: 'Sample Values',
fontSize: 15
}
}],
series: [{
type: 'line',
highlight: { // <--- does nothing
size: 7,
radius: 7
},
style: {
stroke: 'rgb(143,203,203)'
},
xField: 'name',
yField: 'data1',
marker: {
type: 'path',
path: ['M', -2, 0, 0, 2, 2, 0, 0, -2, 'Z'],
stroke: 'blue',
lineWidth: 0
}
}, {
type: 'line',
highlight: { // <--- does nothing
size: 7,
radius: 7
},
fill: true,
xField: 'name',
yField: 'data3',
marker: {
type: 'circle',
radius: 4,
lineWidth: 0
}
}]
});
Ext.Viewport.setLayout('fit');
Ext.Viewport.add(lineChart);

In this configuration we're adding two series (or lines), one bound to the data1 property of the store and the other to data3. The type for both configurations is line. The xField for both series is the same, the name property of the store. Both line series share the same axis, the left axis. You can set particular marker configuration by adding properties onto the markerConfig object. Both series have an object as highlight so that markers animate smoothly to the properties in highlight when hovered. The second series has fill = true which means that the line will also have an area below it of the same color.

Note the comments and emphasis I added.

jep
26 Oct 2012, 12:38 PM
This is marked as INFOREQ. I'm not filling out that bug template. I played that game far too much with 1.x and had a low success ratio.

This bug is very simple and I've given a very clear explanation of why the examples don't match the code. If there's additional information, please feel free to actually ask for it.