Charting issue driving me mad.....

Hello, all! I'm having a bit of an issue with a chart that is about ready to push me over the edge.... LOL!! In this chart, I have three series: First series is hidden, Second series is a visible bar graph, and the third series is an area. For the life of me, I cannot get the Series 2 labels to be embedded in the columns (It's probably something easy that I'm overlooking). This is what I see when I click on the 'Labels' button on Series 2:

What setting am I missing that will allow me to edit the position of the label???

Thanks in advance for the help!

Scott

Answers

  • Hi Scott,

    I can't find a way to enable the Series Label > Format > Position box other than changing the chart type to Pie. I don't know if this helps, but I did find a way to move the labels in code:

    beforeDrawSeries: function(series, seriesOptions, chart, seriesIndex)
    {
    seriesOptions.dataLabels.y = 40;
    },

    Note that a positive value for y moves the labels down and negative moves them up (just to drive me mad :) )

    Jeff F.
    Customer Support Engineer I
    OpenText
  • Jeff,
    Good morning! Thanks for the reply on this question! It did help, but it also has given me a result that isn't quite 'aesthetic' for the end user. If you look at this pic:

    You can see that the lower values fall below the line. Here is what the original chart (where it would allow to choose position) looks like:

    What would be the best way to alleviate this issue? Also, what would be the best way to hide those columns that have a '0' value?

    Thanks again for all the help!

    Scott

  • edited June 20, 2018

    Hi Scott,

    The issue you are seeing now is probably the reason the Position dropdown is disabled. Moving the data labels requires code to handle various situations like this. The code I posted above to reposition the data labels moves all of the labels in the series. I tried adding code to retrieve the data values and set each label position based on the data value but it doesn't work. All of the data labels for the series use the same setting for the Y position. There might be something you can do with modifying styles at the data point level. I'm not sure if that is possible. It might also be possible to hide the data labels and create chart labels that can be placed anywhere in the chart. It would take a lot of code to get the data and position the chart labels. If anything changed it would be a mess to modify all of that code.

    If you can find a jsfiddle where the data labels are positioned like you want them to be, please post the example and I'll try to replicate it in the Designer.

    Jeff F.
    Customer Support Engineer I
    OpenText
  • Hi Scott,

    There's one thing I want to clarify from my previous post. A jsFiddle example that shows this functionality in action would have code to reference the individual data labels. It might need tweaking to work in the Designer, but it would help to see the basic technique. That is why I suggested looking for a working example.

    Jeff F.
    Customer Support Engineer I
    OpenText
Sign In or Register to comment.