1 2 Previous Next 17 Replies Latest reply on Aug 7, 2015 5:24 AM by ankit.narula

# How to create space between line and label

Labels on a line chart are currently right above the last year.  Instead, I would like to create a little bit of space between where the line ends and the label.  I'm fine with the line chart taking up a little bit less space horizontally.  Is that possible?

Additionally, I would like to add a text label before the number, as well as to circle it.  The number is a calculated field.  Is there a way to do all this?

Thanks.

• ###### 1. Re: How to create space between line and label

can you post a workbook?

• ###### 2. Re: How to create space between line and label

Here it is.

In my actual file, there are multiple statistics displayed simultaneously and they run over the the line, as the image shows.

• ###### 3. Re: How to create space between line and label

You mean like this?

I just double-clicked label and pressed enter a few times before the <Statistic>.

• ###### 4. Re: How to create space between line and label

You can also add text and play around with it.

• ###### 5. Re: How to create space between line and label

Hi Ailsa.

No, I mean space between the line and the label in the horizontal direction.  So to the right, not down....

I've incorporated the second part of my question, but this visualization should give you an idea of the problem as the formatting is currently.

• ###### 6. Re: How to create space between line and label

This is a bit ugly with three lines on the same graph, but it shows what I think you're after?

The main trick is to 1) convert Year to continuous and 2) add a reference line on the horiz axis == to max(Year) + 3. This extends the horiz axis to the right and allows you to right-align the labels in the Label formatting. You'll have to play with the + value. based on the size of the chart and number of years -- alternatively multiply the horiz axis value by 120% or something.

The circles are done with a dual-axis chart. I duplicated (ctrl-drag) the SUM(Value) pill to the right and then, to show just the last value, used the formula IIF(LAST()==0, SUM(Value), NULL). Remember to sync the axis after converting to dual-axis and hide the right axis header.

A few of the additional things you might want to do, especially if publishing to Online or Server:

3) Add blank text box over right-most area.

The reference line is still there and can be clicked. To prevent this add a floating text box over the cart where teh

4) Add a white text box over the right-most values in the bottom axis.

This hides 2015, 2016, 2017.

I've left out a few steps, so let me know if you'd like a few more details.

Jim

• ###### 7. Re: How to create space between line and label

Hi Jim,

Thank you very much!  A couple of follow-up questions.

1. When I implement this change in my actual dashboard, the layout container on which the line chart resides goes from filling up the entire allowable screen to taking up only half.  The action that causes this seems to be changing the years pill from discrete to continuous.  I cannot figure out why that is happening.  I realize this is a totally separate question pertaining to layout containers, but figured I'd ask anyways.  Two screenshots are attached.  The first one shows the vertical container where I have the line chart.  The second screenshot shows the horizontal layout container that contains the left vertical container and the main vertical container (where the line chart is).  I cannot figure out what those diagonal lines to the right of the main area are.  If I drag the main layout container all the way to the right, it becomes fixed, but an inch of that diagonal strip is still there.

2. The circles I was referring to actually are around the second number.  So, how difficult would it be do put a circle that has the same color as the relevant line around the second row of numbers .

• ###### 8. Re: How to create space between line and label

Layout Container Issue

Make sure the worksheet is set to "Fit entire view" by clicking on the pulldown in the upper right.

If that doesn't work, are you doing sheet swapping (hiding sheets based on filters)? Check that any hiding worksheets are also set to fit entire view and Fixed Width is deselected.

Circles

I don't think there's an easy way to do this, unless the "mark" won't change. In the above you can see a faint circle around 95.1. I did this by selecting the last mark > Annotate > Mark.  You can adjust the formatting to remove the default arrow and change the square box to rounded.

The problem is that this is for that particular mark only --- Year == 2014, Blue Line --- If you filter to show dates through 2013 only, you won't see the annotation.

• ###### 9. Re: How to create space between line and label

Hi Jim,

I do in fact have sheet swapping in this dashboard.  However, all the sheets have Fit Width (I don't want them to take up more space than they need to by height).  So I'm still really confused what those diagonal lines are to the right (attachment in previous post).  They do not appear in the Layout hierarchy that's to the left of the main screen.

As for the circles, thank you for taking the time with that.  I think I will just forego that feature for now.

Cheers

• ###### 10. Re: How to create space between line and label

Fit width is fine. Is fixed width deselected on all of the worksheets?

This refers to the width of the object inside a layout container and is separate from the Fit to Width option.

Finally if that's not the issue, check that all sheets you're hiding have a discrete pill on either the rows or columns shelf. You can add a dummy "Hide Me" field and then deselect Show Header to hide it.

• ###### 11. Re: How to create space between line and label

Fixed width doesn't actually appear as an option when I've selected Fit to Witdh.  One of the worksheets in fact did not have any discrete pills.  I added one but nothing has changed - the line chart still does not go all the way to the right (the bar chart and crosstab that I have hidden here do however).  Still stumped on this one.

• ###### 12. Re: How to create space between line and label

Well there are a few other things it could be. When you switch back to discrete for the Year pill, it works?

Perhaps it's easier to do a quick screen share to see what's happening?

I'm available later today and Friday. You can reach me directly at jim@dataz.io

• ###### 13. Re: How to create space between line and label

Jim, I may have to forego this feature for now because I need to design the dashboards by tomorrow for a presentation.  I'll reach out when I have a chance to look in greater detail.  Thank you so much for the help and the offer of direct help.

• ###### 14. Re: How to create space between line and label

No problem.

1 2 Previous Next