Can I left align fields of JSON/YAML diagrams?

0 votes
asked Jan 27, 2021 in Wanted features by anonymous
Currently fields of JSON/YAML diagrams are center aligned.

Thanks
commented Feb 10, 2021 by The-Lu (64,760 points)

Hello A. and all,

Just FYI, see similar request (of this Wanted features) here:

Regards,
Th.

2 Answers

0 votes
answered Feb 16, 2021 by Martin (8,360 points)
 
Best answer

This has been changed

The default is now that the field names are left aligned:

@startjson
{
   "very long fruit":"Big piece of Apple",
   "size":"Large",
   "color":"Red"
}
@endjson

But the alignment can be changed using Style:

@startjson
<style>
  jsonDiagram {
    HorizontalAlignment Center
  }
</style>
{
   "very long fruit":"Big piece of Apple",
   "size":"Large",
   "color":"Red"
}
@endjson

See this answer for more new style options.

0 votes
answered Feb 10, 2021 by oscaretu (180 points)
Any clue to modify source code to be able to align to the left?

Kind regards,

Oscar
...