Skip to content

What are all the prebuilt formats possible #4135

Answered by ozyx
VoreckLukas asked this question in Community Q&A
Discussion options

You must be logged in to vote

I'm also interested in the list of built-in formats. Also in knowing what the default formatter does.

Hi @VoreckLukas and @inad9300 ,

Thank you for bringing this to our attention. We genuinely appreciate feedback from our community and recognize that our documentation can certainly be improved. To answer your queries:

The core of a formatter in Open MCT is defined by the Formatter interface (I've provided TypeScript-style interfaces for simplicity):

interface Formatter {
  key: string;
  parse: (value: any) => any;
  format: (value: any) => string;
  validate: (value: any) => boolean;
}

Open MCT on its own defines three built-in formatters:

  1. Number (default):

Applied to data with forma…

Replies: 1 comment 6 replies

Comment options

You must be logged in to vote
6 replies
@VoreckLukas
Comment options

@jvigliotta
Comment options

@inad9300
Comment options

@ozyx
Comment options

Answer selected by ozyx
@inad9300
Comment options

@ozyx
Comment options

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
4 participants