Welcome Guest Search | Active Topics |

Hide dataPointLabelCreating text based on bar segment height
gerrit
#1 Posted : Wednesday, January 21, 2015 10:45:43 AM(UTC)
Rank: Newbie

Groups: Registered
Joined: 11/1/2014(UTC)
Posts: 5
Man

Thanks: 1 times
Was thanked: 0 time(s) in 0 post(s)
when defining a data point label for a stacked bar using dataPointLabelCreating binding, I'd like to access the height of current bar segment, to decide if I should set data.text to value or to empty string. Empty string would avoid overwritten numbers in case the stacked bar elements are not high enough:

[img]http://imgur.com/TASNWt4[/img]

$(document).bind('dataPointLabelCreating', function (event, data) {
console.log(JSON.stringify(data));
});

issues strings on javascript console like:

"type:'textBlock',x:46,y:608.5,width:7.7861328125,height:14,text:'5',font:'14px sans-serif',textBaseline:'middle',textAlign:'center',lineWidth:1,fillStyle:'white',shadowColor:'#cccccc',shadowBlur:8,shadowOffsetX:2,shadowOffsetY:2"

So I can only access height of text block, but not height of bar segment on which the number will be printed. How to hide data point label based on height of bar segment?
Dragan
#2 Posted : Wednesday, January 28, 2015 7:44:10 AM(UTC)
Rank: Advanced Member

Groups: Administrators, DataVizJavaScript, jQueryChart, jQueryDV, MvcChart, Registered
Joined: 1/3/2011(UTC)
Posts: 483

Thanks: 0 times
Was thanked: 87 time(s) in 87 post(s)
Hi,

we've been thinking how this can be achieved, but with the current version of jqChart there isn't such way. We'll try adding something to support your requirement in future release.
Best Regards,
Dragan Matek
jqChart Inc.
Users browsing this topic
Guest
Forum Jump  
You cannot post new topics in this forum.
You cannot reply to topics in this forum.
You cannot delete your posts in this forum.
You cannot edit your posts in this forum.
You cannot create polls in this forum.
You cannot vote in polls in this forum.

FlatEarth Theme by Jaben Cargman (Tiny Gecko)
Powered by YAF 1.9.4 | YAF © 2003-2010, Yet Another Forum.NET
This page was generated in 0.143 seconds.