PDA

View Full Version : Why the legends are not alligned properly for a Extjs scatterd chart series.



yodavu
21 Nov 2017, 6:55 AM
I tried creating a scattered chart with custom marker.
But by default the legend is not aligned. Could anyone help me.

Also i was wondering is there any way we can set a height and width for the path. I saw the scale property but after scaling the image is drawn on the bottom right corner. I want it to scale down to top left corner.

Bellow is the example.
https://fiddle.sencha.com/#view/editor&fiddle/29uj

vick_44
11 Jan 2018, 1:35 AM
The markers were offset both horizontally and vertically which is fixed with below path specification.The markers defined in your path is also too large for the legend config, if you scale it down with below configuration it would appear decent as shown below:




oneMarker: function (surface, opts) {
return surface.add(Ext.apply({
type: 'path',
path: 'M0,0 c0,-10 15,10 15,0 c0,-10 -15,10 -15,0',
fillStyle: '#1F6D91'
}, opts));
},
anotherMarker: function (surface, opts) {
return surface.add(Ext.apply({
type: 'path',
path: 'M0,0 c0,-10 15,10 15,0 c0,-10 -15,10 -15,0',
fillStyle: '#1F6DDD'
}, opts));
}



57330

In the original, the markers were offset both horizontally and vertically as show below.

57331

Hope this helps.