Charticulator Expressions

Alison Box · Apress eBooks · 2022

In this chapter, we take a break from designing charts and instead take a detailed look at the expressions used by Charticulator when you bind data to an attribute. You also may have been at a loss as to how Charticulator’s rather unusual numeric formatting method works. This is where you edit characters inside the curly braces. It’s a syntax known as “d3-format.” Have you ever heard of it? No? Well, neither had I nor indeed have any of my more “techie” friends. It doesn’t help that Charticulator’s documentation doesn’t throw much light on how you’re meant to use this syntax (it took me some time to find out how to insert a comma separator). Just to fill you in, “d3-format” is used by JavaScript programmers to format numbers, apparently for “human consumption,” according to GitHub ( ), and is based on Python 3’s formatting specifications. However, I don’t suppose knowing this really helps a lot, so in this chapter I will throw some light on this rarefied syntax language. What we will also discover is that there is an alternative approach to formatting numerical fields using DAX, and we will explore this possibility at the end of this chapter.

Read the paper · More papers on PaperTik