Hi,
I am configuring a bar chart in perspective to display OEE values. I want to display the value like a label on top of each bar but cannot find that feature. Is this not possible?
/Mikael
Hi,
I am configuring a bar chart in perspective to display OEE values. I want to display the value like a label on top of each bar but cannot find that feature. Is this not possible?
/Mikael
I think i may have just figured this out.
Using an XY chart i created a bar graph using the column renderer. then i copied the series and changed the renderer to line. this adds the property “Bullets”. Choosing the label bullet type and then linking to the proper field in the data i was able to have labels. i set the stroke width on the line to 0 to make it disappear and played with the offset property to make the label appear at the top of the bar.
Phil, Thank you for this feedback! It’s very useful.
Do you know, maybe, is it possible to change color of the bullets label?
Thanks!
My colleague made a post asking the same thing and last i checked there was a bug that wouldnt allow the color to be changed even if the color property was changed.
Ok, Thank you very much!
Hello thank you for sharing, and I have the same problems. But I still confuse how you did it, So you copy the series and make the render as line, what did you change the bullet.0.label to? and did you bind the label to the proper field in the data? thanks!
The label should be the key in the data source object. In the picture I used the CycleTime key I created when I generated the data source. For your version you should replace CycleTime with whatever key you are showing on your bars.
i got it works, thank you!
Hello Phil,
I am working on having the label on top of bars by your way, and it perfectly works. However, I realize that, with your way, I have to put my multiple data in the same array, which means I can’t have different colors of the bar charts. ( I understand that if I put datas in different arrays, and have column and line series for each data will work, but we adding over 50 series will be extremely slow and not doable). do you have any idea to have label on top of the bar and have different color also? thanks
So the way i did it in the example above is that i used the deriveDataFromField property and set the fill property to the data source key for the bar color. the bar color was determined when i ran the script to get the data, i got the data and then parsed it out to figure what color the bar should be then added the key for the bar color to the data source object and finally set the data source property with the full data object.
I got it figure out, the problem I have is that I have to set different axis, I can’t use the same Y/X axis. so basically i have different series array to achieve bars with different colors. and have additional series array with all data for the line render to achieve the label on top of the bars. thanks for your help!
Glad to hear you got it working.
As per above method i have successfully displayed the values at the top of BarChart but not able to Resize & Reposition the label at the Top of Bar. It is also not resizing as per the size of the window.Kindly find the attached Screenshot for reference.
I have found that my method i talked about above does not work well if you have multiple bars per category. this is because the “invisible line” series doesn’t line up with its respective bar.
Hi Phil
I see sometimes my label relace with … even I have enough space.
I think you may need to update the bulets.0.width or length property.
I did it but nothing is changed.
Weird. let me make a test chart and see if i can duplicate this behavior so i can try some things.
Thanks just consider the orientation of bar chart which is horizontally.
I can simply replicate it by switching between preview mode and design mode (press F5)