Animate Data In Numbers

How

Number animation, as in, imagine a number changing from 1 to 2, then 2 to 3, then 3 to 4, etc. over a specified time. Like a counter, except controlled by the same kind of animation that we use for other design animation on the web. This could be useful when designing something like a dashboard, to bring a little pizazz to the numbers. Amazingly, this can now be done in CSS without much trickery. You can jump right to the new solution if you like, but first let’s look at how we used to do it.

One fairly logical way to do number animation is by changing the number in JavaScript. We could do a rather simple setInterval, but here’s a fancier answer with a function that accepts a start, end, and duration, so you can treat it more like an animation:

Get in touch with us now., Jan 13, 2021. In 2018, the global animation market was worth 259 billion U.S. Dollars, and is expected to grow to 270 billion by 2020. Animation is big business, with. Learn how to create Number Flip PowerPoint Animation Effect in PowerPoint 2013 & 2016 versions. The animation effect makes it look like flipping a calendar. Number animation, as in, imagine a number changing from 1 to 2, then 2 to 3, then 3 to 4, etc. Over a specified time. Like a counter, except controlled by the same kind of animation that we use for other design animation on the web. This could be useful when designing something like a dashboard, to bring a little pizazz to the numbers. Animate, share, or save drawings in Numbers on Mac You can draw in a Numbers spreadsheet on iPhone and iPad. If you later open the spreadsheet in Numbers for Mac, you can animate the drawing, share it, or save it to Photos as an image or movie file.

Keeping it to CSS, we could use CSS counters to animate a number by adjusting the count at different keyframes:

Another way would be to line up all the numbers in a row and animate the position of them only showing one at a time:

Some of the repetitive code in these examples could use a preprocessor like Pug for HTML or SCSS for CSS that offer loops to make them perhaps easier to manage, but use vanilla on purpose so you can see the fundamental ideas.

The New School CSS Solution

With recent support for CSS.registerProperty and @property, we can animate CSS variables. The trick is to declare the CSS custom property as an integer; that way it can be interpolated (like within a transition) just like any other integer.

Important Note: At the time of this writing, this @property syntax is only supported in Chrome ( and other Chromium core browsers like Edge and Opera), so this isn’t cross-browser friendly. If you’re building something Chrome-only (e.g. an Electron app) it’s useful right away, if not, wait. The demos from above are more widely supported.

The CSS content property can be used to display the number, but we still need to use counter to convert the number to a string because content can only output <string> values.

See how we can ease the animations just like any other animation? Super cool!

Typed CSS variables can also be used in @keyframes:

One downside? Counters only support integers. That means decimals and fractions are out of the question. We’d have to display the integer part and fractional part separately somehow.

Can we animate decimals?

It’s possible to convert a decimal (e.g. --number) to an integer. Here’s how it works:

  1. Register an <integer> CSS variable ( e.g. --integer ), with the initial-value specified
  2. Then use calc() to round the value: --integer: calc(var(--number))
Data

In this case, --number will be rounded to the nearest integer and store the result into --integer.

Sometimes we just need the integer part. There is a tricky way to do it: --integer: max(var(--number) - 0.5, 0). This works for positive numbers. calc() isn’t even required this way.

We can extract the fractional part in a similar way, then convert it into string with counter (but remember that content values must be strings). To display concatenated strings, use following syntax:

Here’s a full example that animates percentages with decimals:

Other tips

Because we’re using CSS counters, the format of those counters can be in other formats besides numbers. Here’s an example of animating the letters “CSS” to “YES”!

Oh and here’s another tip: we can debug the values grabbing the computed value of the custom property with JavaScript:

That’s it! It’s amazing what CSS can do these days.

You can also use Select and Scroll with Apple Pencil to select objects and scroll in your spreadsheet or presentation.

Animate Data In Numbers

Turn handwriting into text with Scribble

With Scribble, you can turn handwriting into text with an Apple Pencil on a supported iPad.* When you pair an Apple Pencil with an iPad, Scribble is on by default. To check the Scribble setting, or to turn it off, go to Settings > Apple Pencil on your iPad.

  1. In a spreadsheet or presentation, tap your pencil in the slide or spreadsheet where you want to write. Or tap in a text box, shape, or table cell.
  2. Tap the Scribble tool in the toolbar at the bottom of the screen, then start writing.

As you write with Apple Pencil, you can also delete words, insert text, and more:

  • To delete a word, scratch it out.
  • To insert text between words, tap and hold in a text area, then start writing when a space opens.
  • To join or separate characters, draw a vertical line between them.
  • To select text, circle it or draw a line through it. Drag the selection handles to change the selection.

The toolbar also has buttons to format and align text.

* You can change to another supported language in the toolbar if you’ve added the keyboard for the language in Settings > General > Keyboard > Keyboards. Check to see which languages and regions Scribble supports.

Add a drawing

  1. To draw with Apple Pencil, tap your pencil on the page. To use your finger, or if you've turned on Select and Scroll, tap the Insert button , tap the Media button , then tap Drawing.
  2. Tap one of the four drawing tools at the bottom of the screen: the pen, pencil, crayon, or the fill tool.
  3. To draw with a different stroke size and opacity, tap one of the drawing tools twice, then tap a new stroke size. Or drag the slider to adjust the opacity.
  4. You can draw with a different color:
    • For iPhone, tap the colored circle, then choose a preset color at the bottom of the Colors screen. Or use the controls to mix your own colors, then tap the Add button to save the color as a favorite.
    • For iPadOS 14, tap a preset color or tap the color wheel to choose a custom color. Use the controls to mix your own color, then tap the Add button to save the color as a favorite. To remove a favorite, touch and hold its color dot, then tap Delete.
    • For iPadOS 13, tap the color well, then either tap a color in the grid or swipe left and create a custom color.
  5. To erase, tap the eraser, then tap it again to choose one of the erasers:
    • To erase pixels, tap Pixel Eraser, then tap or drag on the drawing.
    • To erase a whole stroke, tap the Object Eraser, then tap the stroke or object fill you want to erase.
  6. To undo the last action, tap the Undo button .
  7. When you’re finished, tap Done.

To continue drawing with Apple Pencil, just start drawing on the page.

Resize and move your drawing

You can resize and move the drawing after you've added it:

  • To resize the drawing, tap the drawing with your finger, then drag the handles of the box.
  • To move the drawing, tap the drawing with your finger, then drag it.

Edit parts of a drawing

  1. If necessary, tap the drawing with your finger, then tap Edit Drawing from the pop-up menu.
  2. Tap the selection tool at the bottom of the screen, then tap or drag around the part you want to edit. An outline appears around the selection.
  3. Tap an option in the pop-up menu:
    • To resize a selection, tap Resize, then drag the handles of the box around the selection.
    • To make one drawing into two drawings, tap Separate in the pop-up menu.
    • You can also cut, copy, paste, delete, and duplicate a selection.
Animate Data In Numbers

Animate a drawing

Animate a drawing in Keynote

In Keynote on iPhone, iPad, or iPod touch, you can animate a drawing to make it look like it's being drawn (using the Build In effect) or erased (using the Build Out effect):

  1. Choose the slide with the drawing, then tap or click the drawing to select it.
  2. Tap the drawing again, then tap Animate from the pop-up menu.
  3. Choose Build In or Build Out.
  4. In the pop-up menu, choose Line Draw, then tap Play to preview the animation.
  5. When you're finished, tap Done.

On a Mac, you can animate a drawing that you added to a presentation in Keynote on iPhone or iPad.

Animate a drawing in Numbers

In Numbers on iPhone, iPad, or iPod touch, you can animate a drawing so it appears as if it's being drawn:

  1. If you're in drawing mode, tap Done. Otherwise, go to the next step.
  2. Tap the drawing to select it.
  3. Tap the Format button , then tap Drawing.
  4. Turn on Animate Drawing, then adjust other options such as duration.
  5. To play back the animation, tap Play or Play Drawing.

On a Mac, you can animate a drawing that you added to a spreadsheet in Numbers on iPhone or iPad.

Share or save a drawing

In Numbers and Keynote, you can share or save a drawing as an image file (.png). In Numbers, if you animated the drawing, you can share or save a drawing as a movie file (.m4v).

  1. Tap the drawing to select it, then choose Share. If you animated the drawing in Numbers, choose “Share as Image” or “Share as Movie.”
  2. Choose how you want to send your image or movie, like with Mail, Messages, or another service. Or, choose Save Image (or Save Video for animated Numbers drawings) to save to the Photos app.

On a Mac, you can share or save a drawing that's been added to a spreadsheet or presentation in Numbers or Keynote on iPhone or iPad.

  1. In the spreadsheet or presentation with the drawing, Control-click the drawing.
  2. Choose Share. If you animated the drawing, choose “Share as Image” or “Share as Movie.”
  3. Choose how you want to send your image or movie, like with Mail, Messages, or another service. Or, choose Add to Photos to save your image (or movie for animated Numbers drawings) to the Photos app.

How to turn on Select and Scroll with Apple Pencil

Numbers

By default, you can use Apple Pencil to start drawing. You can set Numbers or Keynote to use your Apple Pencil to select objects and scroll in your documents instead:*

  1. In Numbers or Keynote, tap the More button .
  2. Tap Apple Pencil, then turn on Select and Scroll.

If your Apple Pencil supports it, you can turn on Double-Tap to Switch. With Double-Tap to Switch, just double-tap the lower part of Apple Pencil to turn Select and Scroll on and off.

Animate Data In Numbers For Mac

To add a drawing to a spreadsheet or presentation when Select and Scroll is turned on, tap the Insert button , tap the Media button , then tap Drawing.

How To Animate Data In Numbers

* Pages, Numbers, and Keynote each have their own setting for Select and Scroll. For example, if you turn on Select and Scroll in Pages, it doesn't affect Keynote or Numbers.

Animate Data In Numbers For Mac

Learn more

  • Add drawings and annotations to a document in Pages on iPhone or iPad.
  • Connect your Apple Pencil with iPad.
  • Enter data easily using forms in Numbers.