Tables in an Article

Add a JSON or HTML data table, and understand the options for changing the look of your table.

Overview

Apple News Format lets you add both JSON and HTML tables as components in your article.

  • In JSON tables, you create the table structure and add data using JSON objects and properties. You can also sort your data in the table.

  • In HTML tables, you use HTML tags to set up a table with your data already formatted as HTML rows.

For both the JSON and HTML table components, you can adjust the look of the rows, columns, and cells in the table using the Component Style object used by the component.

Once you add a table, you can apply styles (backgrounds, borders, and so on) and add row and column labels. You can also use conditions to apply styles only to those rows, columns, and cells that meet a specific criteria. See Enhancing Your Articles with Styles.

Topics

Tables with JSON Data

Adding a JSON Table

Add a table to your article that displays JSON data in rows and columns.

object DataTable

The component for adding a JSON data table.

object RecordStore

The object that contains JSON data for a data table.

object DataDescriptor

The object for providing the data type, data formatting, and label for a field in a table.

object DataTableSorting

A data category by which to sort the table in descending or ascending order.

object DataFormat

Properties shared by all data format obejct types.

object FloatDataFormat

The object that allows you to specify the number of digits after the decimal point for numeric values in data table cells.

object ImageDataFormat

The object that allows you to specify the minimum and maximum dimensions for images in data table cells.

Tables with HTML Data

Adding an HTML Table

Add a table formatted in HTML to your article.

object HTMLTable

The component for adding tables with HTML data.