cancel
Showing results for 
Search instead for 
Did you mean: 

Widget Design Options not Working / Unwanted Label Wrap-Around

skilpatr88
7 - Data Storage

I have a top 10 bar chart where the design options are not functioning. If I change the value label direction, X-axis options, Y-axis options, etc it has no effect at all. There is a script in the widget but has nothing to do with design. 

This now applies to most widgets in my dashboard even those having nothing to do with tabber, although there are a few widgets it does not affect. I can see no pattern as to why.

I also observe that recently the X-axis label has switched to wrap-around text which is not helpful since it takes up too much space. I'm trying to default to the usual shortened format.

I'm very new to Java so I will post the script that does exist just to rule out it has anything to do with this problem. 

What could be causing the issue? Any help much appreciated!

 
widget.on("beforequery", function (se, ev) {
$.each(ev.widget.metadata.panels[1].items, function(index, value){
if(value.disabled == true)
{
var newJaql = {
jaql  : JSON.parse(JSON.stringify(value.jaql))
}
ev.query.metadata.push(newJaql)
lastIndex = ev.query.metadata.length - 1
ev.query.metadata[lastIndex].disabled = false
}
})
})
 
widget.on("beforedatapointtooltip", function (se, args){
 
var valueSet, breakbyExist = false, categoryExist = false
 
if(args.widget.metadata.panels[2].items.length > 0)
breakbyExist = true
 
if(args.widget.metadata.panels[0].items.length > 0)
categoryExist = true
 
category = args.context.category
seriesName = args.context.points[0].seriesName
 
if(categoryExist)
{
categoryTitle = args.widget.metadata.panels[0].items[0].jaql.title
categoryIndex = args.widget.rawQueryResult.headers.indexOf(categoryTitle)
}
 
if(breakbyExist)
{
breakbyTitle = args.widget.metadata.panels[2].items[0].jaql.title
breakByIndex = args.widget.rawQueryResult.headers.indexOf(breakbyTitle)
}
 
$.each(se.rawQueryResult.values, function(key, value)
   {
if(!categoryExist)
{
if(value[breakByIndex].text == seriesName)
{
valueSet = value
}
}else if(!breakbyExist)
{
if(value[categoryIndex].text == category)
{
valueSet = value
}
}else
{
if(value[breakByIndex].text == seriesName && value[categoryIndex].text == category)
{
valueSet = value
}
}
})
 
$.each(args.widget.metadata.panels[1].items, function(index, value){
if(value.disabled == true)
{
 
resultIndex = args.widget.rawQueryResult.headers.indexOf(value.jaql.title)
args.context.points[args.context.points.length]= {
 
seriesName: value.jaql.title,
showPercentage: false,
value: valueSet[resultIndex].text,
valueColor: args.context.points[0].valueColor
 
}
}
})
})
1 ACCEPTED SOLUTION

DRay
Community Team Leader

Hi @skilpatr88,

Thank you for the update. It's hard to get a feel for what the issue is without looking at the widget. Are you able to open a support case for this? Our support team will be able to meet with you to figure out what is happening.

David Raynor (DRay)

View solution in original post

3 REPLIES 3

DRay
Community Team Leader

Hello @skilpatr88,

Thank you for reaching out. I see your question hasn't gotten a response yet, so I'm asking internally to try and get you an answer. 

David Raynor (DRay)

skilpatr88
7 - Data Storage

Hi David,

Thank you. I noticed that the wrap-around issue has resolved itself although the inability to edit designs remains a problem.

DRay
Community Team Leader

Hi @skilpatr88,

Thank you for the update. It's hard to get a feel for what the issue is without looking at the widget. Are you able to open a support case for this? Our support team will be able to meet with you to figure out what is happening.

David Raynor (DRay)