Opened 7 years ago

Closed 3 years ago

#16252 closed enhancement (patchwelcome)

ChartSeries - add easier way to set label property

Reported by: Mike Wilcox Owned by: Eugene Lazutkin
Priority: undecided Milestone: 1.13
Component: Charting Version: 1.8.1
Keywords: Cc:
Blocked By: Blocking:

Description

This is how I would expect to add a label from a store:

new StoreSeries(seriesStore, storeSortOptions, {y:"age", label:"FirstName", tooltip:"tooltip"});

"label" does not work (nor does labelFunc in this location). Note that "tooltip" does work, although judging by the code, that may be a side effect and not on purpose.

This is how it has to be done:

chart.addAxis("x", { labelFunc:function(text, value, precision){
	var idx = value - 1;
	var item = seriesStore.objects[idx];
	return item.text || "";
}})

That doesn't look so bad when it is coded up for you, but it's far from intuitive and many hours were spent trying to figure it out.

Change History (1)

comment:1 Changed 3 years ago by dylan

Milestone: tbd1.12
Resolution: patchwelcome
Status: newclosed

Given that no one has shown interest in creating a patch in the past 2+ years, I'm closing this as patchwelcome.

Note: See TracTickets for help on using tickets.