Select to view content in your preferred language

How to Label fractions

1618
4
Jump to solution
12-07-2021 07:39 AM
by Anonymous User
Not applicable

Hi Everyone,

I'm trying to digitize and update some old maps and I am running into some difficulty with labelling some features the way I want to... I want to create the labels to be fractions that are vertical (i.e. a horizontal fraction line) and can be up to 3 lines (see attached image for example). There was a post about fractions a few years ago but it wasn't quite what I was looking for and was hoping with updated versions it may be more possible now.

I have access to arcmap 10.7.1 and ArcGIS Pro 2.6.3

I appreciate any help!

Tags (2)
0 Kudos
1 Solution

Accepted Solutions
jcarlson
MVP Esteemed Contributor

It does look a bit cheesy. Well, let's see what we can do, then!

Personally, I think you may be better off using Symbology for this sort of thing. I'm using static values to test this, but you could easily make these attribute-driven by enabling the setting "Allow symbol property connections":

jcarlson_1-1638894983238.png

In my symbology, I have a series of marker layers. I'm going to set them each to a text symbol:

jcarlson_0-1638894960224.png

You should be able to pipe in a text string from your data:

jcarlson_2-1638895063663.png

I should mention at this point that I don't know how your data is organized. Are these values coming from different fields? I'm assuming they are.

At this point, I've got three text symbols corresponding to 6.0, 3.2, and 1.4:

jcarlson_3-1638895198702.png

Not quite there. Now I'll give them each a value for Offset Y.

jcarlson_4-1638895281067.png

Now for the lines. I'll add new marker symbols and set them to the "line" symbol:

jcarlson_5-1638895351330.png

Now I'll set each of them to a 90 degree rotation, then tweak their size, line width, and Offset Y.

jcarlson_6-1638895504264.png

Looks great!

...Except that this is another symbol. So to keep the points, I'll need to apply this sort of symbology to a duplicate layer in my contents. And to get them in the right position, I'll need to adjust the Offset X (or whatever you prefer) to get them off to the side from the point symbol itself.

jcarlson_7-1638895738070.png

That's looking like what we want.

Caveat

This method uses offsets and marker symbols that are specifically place for the given fraction style. In order to correctly apply this method to different fractions (2 or 4 "levels"), you'd need to use classified symbology, and somehow use an expression to split your points into 2-layer, 3-layer, and 4-layer fractions. I'm sure this is possible using a simple Arcade expression.

It's a lot of clicking and tweaking to get this set up, but the end result is a much nicer-looking label. I've attached a zipped .stylx file to get you started, if you like this method.

- Josh Carlson
Kendall County GIS

View solution in original post

4 Replies
jcarlson
MVP Esteemed Contributor

Could you simply underline some of the text and separate them onto different lines?

1.35
0.70

or

3.77
4.21
9.38

It's not perfect, but it  would be the easiest way of accomplishing the effect.

- Josh Carlson
Kendall County GIS
0 Kudos
by Anonymous User
Not applicable

 I did try that but it just looks so cheesy in a professional report 🙂 was hoping for something better. I was considering trying to just separate the numbers and just manually drawing lines

0 Kudos
jcarlson
MVP Esteemed Contributor

It does look a bit cheesy. Well, let's see what we can do, then!

Personally, I think you may be better off using Symbology for this sort of thing. I'm using static values to test this, but you could easily make these attribute-driven by enabling the setting "Allow symbol property connections":

jcarlson_1-1638894983238.png

In my symbology, I have a series of marker layers. I'm going to set them each to a text symbol:

jcarlson_0-1638894960224.png

You should be able to pipe in a text string from your data:

jcarlson_2-1638895063663.png

I should mention at this point that I don't know how your data is organized. Are these values coming from different fields? I'm assuming they are.

At this point, I've got three text symbols corresponding to 6.0, 3.2, and 1.4:

jcarlson_3-1638895198702.png

Not quite there. Now I'll give them each a value for Offset Y.

jcarlson_4-1638895281067.png

Now for the lines. I'll add new marker symbols and set them to the "line" symbol:

jcarlson_5-1638895351330.png

Now I'll set each of them to a 90 degree rotation, then tweak their size, line width, and Offset Y.

jcarlson_6-1638895504264.png

Looks great!

...Except that this is another symbol. So to keep the points, I'll need to apply this sort of symbology to a duplicate layer in my contents. And to get them in the right position, I'll need to adjust the Offset X (or whatever you prefer) to get them off to the side from the point symbol itself.

jcarlson_7-1638895738070.png

That's looking like what we want.

Caveat

This method uses offsets and marker symbols that are specifically place for the given fraction style. In order to correctly apply this method to different fractions (2 or 4 "levels"), you'd need to use classified symbology, and somehow use an expression to split your points into 2-layer, 3-layer, and 4-layer fractions. I'm sure this is possible using a simple Arcade expression.

It's a lot of clicking and tweaking to get this set up, but the end result is a much nicer-looking label. I've attached a zipped .stylx file to get you started, if you like this method.

- Josh Carlson
Kendall County GIS
by Anonymous User
Not applicable

Thank you very much for this 🙂 I think this will work just fine!

0 Kudos