Docs menuexpand_more
travel_exploreTry in the API Viewer

Guides

Reference

Other pages

Endpoints

search
appsAll APIs
functionHow metrics are calculated

Cookbook · Applied · Hands-on 7

Display rules for financial tables and charts: units, missing values, sources, and mobile-friendly statements

Display rules for financial tables and charts: units, rounding, null values, negatives, sources, and CSS that keeps wide financial statements readable on phones.
For developersFor companies8 min read
open_in_newIllustrated series on Qiita (Japanese)The same topic is also published as an illustrated series on Qiita.

Endpoints used

On a financial data screen, the numbers can be correct and still be misread because of how units or missing values are shown. This page collects the display rules we follow when showing values from the ZENITH Code income statement endpoint in tables and charts, with code.

  • State the unit once in the header. Keep values in yen as the API returns them, and convert only right before display.
  • Show missing values (null) as "—", never 0, and add the reason when you know it.
  • Put the source and retrieval time next to the table. On phones, scroll the table, not the page.

The examples use Toyota Motor (7203) for the fiscal years ended March 2021 through 2025, retrieved from the production API on October 27, 2026 at 16:50 JST.

We at Crabgrass Inc. build ZENITH Code, an API for financial and disclosure data on Japanese companies. This article is an implementation guide for using our own data.

Seven display rules

Here are the rules up front. The sections below explain each one with code.

Rule Why
Put the unit in the header, not in every cell Repeating "¥ bn" in every cell makes magnitudes harder to compare
Calculate in yen; round only at the end Calculations on rounded values accumulate error
Multiply API ratios by 100 for % API ratios are decimals from 0 to 1 (0.0998 = 9.98%)
Show missing values as "—", never 0 Writing 0 erases the difference between "no data" and "¥0"
Mark negatives with "−", not just color Readers with color vision deficiency and black-and-white printouts still need to see them
Include fiscal period, accounting standard, and consolidation rows Readers can check in the table whether columns are comparable
Put source and retrieval time near the table Anyone can trace which filing and which moment a number came from

Units and rounding

All API amounts are in yen. Toyota's revenue for the fiscal year ended March 2025 is 48036704000000 (¥48.04 trillion). Convert to trillions, billions, or millions only for display.

const UNITS = {
  yen: { divisor: 1, label: "¥", digits: 0 },
  million: { divisor: 1e6, label: "¥ million", digits: 0 },
  billion: { divisor: 1e9, label: "¥ billion", digits: 1 },
  trillion: { divisor: 1e12, label: "¥ trillion", digits: 2 },
};

export function formatAmount(value, unit = "billion") {
  if (value === null || value === undefined) return null;
  const { divisor, digits } = UNITS[unit];
  return new Intl.NumberFormat("en-US", {
    minimumFractionDigits: digits,
    maximumFractionDigits: digits,
  }).format(value / divisor).replace("-", "−");
}

export function formatRatio(value, digits = 2) {
  if (value === null || value === undefined) return null;
  return new Intl.NumberFormat("en-US", {
    style: "percent",
    minimumFractionDigits: digits,
    maximumFractionDigits: digits,
  }).format(value).replace("-", "−");
}
  • Pick one unit per table. Don't mix trillions and billions in the same table.
  • Keep decimal places consistent within a column. Without minimumFractionDigits, you get 45.1 next to 48.04.
  • Replace the hyphen (-) with a true minus sign (−). It's closer to digit width, so columns line up better.

The same ¥48,036,704,000,000 in different units:

Unit Display
¥ trillion (2 decimals) 48.04
¥ billion (1 decimal) 48,036.7
¥ million (integer) 48,036,704

Large-cap annual figures read well in trillions or billions; small and mid caps in billions or millions. When a table holds several companies, choose a unit that keeps the smallest company's figures meaningful.

Missing values

When the API returns null, put "—" in the table. Never 0. Add a short reason when you know it.

const NULL_TEXT = {
  non_jpy_material: "non-yen",
};

export function cellText(row, field, kind, unit) {
  const value = row[field];
  if (value !== null && value !== undefined) {
    return kind === "ratio" ? formatRatio(value) : formatAmount(value, unit);
  }
  const reason = row.nullReason ? ` (${NULL_TEXT[row.nullReason] ?? row.nullReason})` : "";
  return `—${reason}`;
}

Common reasons for null in the income statement endpoint each mean something different:

Case Example How to show it
The standard has no such line Ordinary income (ordinaryIncome, a Japanese GAAP subtotal) for IFRS companies. Also null in Toyota's sample response "— (not used under IFRS)" with a note
No such line on the statement grossProfit for companies with no gross profit line. Also null in Toyota's sample response "—"
Industry-specific format Companies that report only operating revenue or ordinary revenue (railways, utilities, banks) have null netSales Use revenue for the top line
Not reported in yen US dollar reporters (6269 and 9399), with nullReason of non_jpy_material "— (non-yen)"
Not yet available Pre-listing income statements of newly listed companies "— (not available)"

Add one line to the table footnote: "— means no value, not zero." It saves readers from guessing.

Don't connect lines across missing values

If a line chart skips a missing period and connects the neighbors, it looks as if the missing period had an in-between value. Break the line at gaps.

export function segments(points) {
  const out = [];
  let run = [];
  for (const p of points) {
    if (p.value === null || p.value === undefined) {
      if (run.length) out.push(run);
      run = [];
    } else {
      run.push(p);
    }
  }
  if (run.length) out.push(run);
  return out;
}

function linePath(points, x, y) {
  return segments(points)
    .map((run) => run.map((p, i) => `${i ? "L" : "M"}${x(p.period)},${y(p.value)}`).join(""))
    .join("");
}

segments() splits the series at each missing value. In an SVG path, every M (move) starts a new line, so the two sides of a gap stay separate.

Bar charts work the same way. Draw no bar for a missing period and put "—" under the axis. A zero-height bar is indistinguishable from ¥0.

A few more chart pitfalls:

  • Don't overlay two vertical axes. If you show revenue and operating income together, use two stacked panels. Bar heights on different axes can't be compared.
  • Start bar-chart axes at zero. A truncated axis makes small differences look large. A margin line chart doesn't have to start at zero, but always label the axis.
  • There's nothing between the points. An annual line connects yearly values; it doesn't represent mid-year values.

Add period and classification rows to the table

Below the amount rows, add rows for accounting standard and, where relevant, period length and consolidation. Readers can then see in the table whether columns are comparable.

Item FY Mar 2021 FY Mar 2022 FY Mar 2023 FY Mar 2024 FY Mar 2025
Revenue (¥ trillion) 27.21 31.38 37.15 45.10 48.04
Operating income (¥ trillion) 2.20 3.00 2.73 5.35 4.80
Operating margin 8.08% 9.55% 7.33% 11.87% 9.98%
Accounting standard IFRS IFRS IFRS IFRS IFRS

Source: ZENITH Code (processed from TDnet, EDINET, and company disclosures). Retrieved 2026-10-27 16:50 JST. Consolidated, full year. Amounts rounded to two decimals for display only.

If a period's length (fiscalPeriodDays) differs sharply from the others, mark that column with something like "9 months." In a fiscal year-end change, revenue differences can't be explained by performance alone. For comparison rules, see Calculate year-over-year growth correctly.

Show the source and retrieval time

Right under each table or chart, write:

  • Retrieved: when you fetched the data from the API, in Japan time, labeled "JST."
  • Scope: consolidated or standalone, full year or quarter, accounting standard.
  • Filings: per-period filing IDs where useful. See Track the source of every financial figure.

Pages that other people see, such as your own product, have more rules:

  • Showing financial data to third parties in your own service requires the Business plan or above. On Free and Pro, you can't make the data, or results derived from it, available to others.
  • When you show it, include "Data provided by ZENITH Code (Source: processed from TDnet, EDINET, and company disclosures)."
  • Also state that the accuracy of the data isn't guaranteed and that it isn't investment advice.
  • Stock prices and values computed from them can't be shown to third parties on any plan. Neither can TDnet filings themselves (PDFs or links to them).

Check What you can and can't display for details.

Make financial tables readable on phones

A five-year statement doesn't fit a phone screen, and shrinking the whole table makes it unreadable. Let the table scroll horizontally inside its own box, and pin the row labels to the left.

<figure class="fin">
  <div class="fin-scroll" role="region" aria-labelledby="fin-caption" tabindex="0">
    <table>
      <caption id="fin-caption">Toyota Motor (7203) income statement (¥ trillion)</caption>
      <thead>
        <tr><th scope="col">Item</th><th scope="col">FY Mar 2024</th><th scope="col">FY Mar 2025</th></tr>
      </thead>
      <tbody>
        <tr><th scope="row">Revenue</th><td>45.10</td><td>48.04</td></tr>
        <tr><th scope="row">Operating margin</th><td>11.87%</td><td>9.98%</td></tr>
      </tbody>
    </table>
  </div>
  <figcaption>Source: ZENITH Code / Retrieved 2026-10-27 16:50 JST / — means no value (not zero)</figcaption>
</figure>
:root { --fin-bg: #ffffff; --fin-ink: #17263e; --fin-line: #e1e8ef; }
@media (prefers-color-scheme: dark) {
  :root { --fin-bg: #0e131a; --fin-ink: #f1f5fa; --fin-line: #39475a; }
}

.fin-scroll {
  overflow-x: auto;              /* scroll the table, not the page */
  -webkit-overflow-scrolling: touch;
}
.fin table {
  border-collapse: separate;
  border-spacing: 0;
  background: var(--fin-bg);
  color: var(--fin-ink);
  font-variant-numeric: tabular-nums;  /* equal-width digits keep columns aligned */
  white-space: nowrap;                 /* never wrap an amount */
}
.fin td { text-align: right; padding: 8px 12px; border-bottom: 1px solid var(--fin-line); }
.fin th[scope="row"] {
  position: sticky;              /* keep row labels visible while scrolling */
  left: 0;
  background: var(--fin-bg);     /* without a background, scrolled numbers show through */
  text-align: left;
  padding: 8px 12px;
  border-bottom: 1px solid var(--fin-line);
}
.fin caption { text-align: left; font-weight: 600; padding-bottom: 8px; }

What each piece does:

  • Put overflow-x: auto on the wrapping div; it has no effect on table itself. If the whole page scrolls sideways, other components get pushed off screen too.
  • Always give the sticky column a background color, or scrolled numbers show through the labels.
  • font-variant-numeric: tabular-nums draws every digit at the same width, so stacked amounts line up and are easy to compare.
  • role="region", aria-labelledby, and tabindex="0" let keyboard users scroll the table and let screen readers announce its name.
  • Right-align amount columns. Left-aligned numbers of different lengths are hard to compare.

Oldest first or newest first

On a phone, the first visible column matters most.

  • For trend tables, put the oldest period on the left so the table matches the chart. Auto-scroll to the latest period on load so the newest value is visible right away.
  • For "check the latest number" tables, put the newest period on the left.

Pick one per screen. A table that runs newest-first next to a chart that runs oldest-first invites misreading.

Use 16px or larger text in form fields

Safari on iPhone zooms in when you focus an input with text smaller than 16px. Make the ticker input at least 16px on narrow screens.

@media (max-width: 620px) {
  .fin-controls input, .fin-controls select { font-size: 16px; }
}

Redraw charts when the width changes

An SVG chart computes tick and bar positions from the width at draw time. When the screen rotates or the container resizes, redraw at the new width. Scaling the whole chart shrinks the axis labels too.

function watchWidth(container, draw) {
  let last = 0;
  const observer = new ResizeObserver(([entry]) => {
    const width = Math.round(entry.contentRect.width);
    if (width === last) return;  // ignore height-only changes
    last = width;
    draw(width);                 // redraw from data in memory; don't call the API again
  });
  observer.observe(container);
  return () => observer.disconnect();
}

ResizeObserver reacts to changes in the chart's container rather than the window, so it also catches a sidebar opening or closing. Redraw from the data you already have; don't call the API again.

Read the numbers carefully

  • API ratios are decimals from 0 to 1. Operating margin is 0.0998 in the API and 9.98% on screen. Forget to multiply and you show 0.10%; multiply twice and you show 998%.
  • Differences between ratios are percentage points. Going from 11.87% to 9.98% is −1.89 points. Writing "−15.9%" gives a different number (a growth rate).
  • Missing isn't zero. Ordinary income is null for IFRS companies because the standard has no such subtotal. Showing 0 suggests it was ¥0.
  • Use revenue for the top line. netSales is the "net sales" line on the statement and is null for companies that report only operating revenue or ordinary revenue (railways, utilities, banks). Use revenue for a revenue row across companies.
  • Don't calculate from rounded values. Operating income YoY from the displayed ¥5.35 and ¥4.80 trillion is −10.28%; from raw yen it's −10.41%.
  • Timestamps come back in UTC. Convert retrieval and disclosure times to Japan time before showing them.

Summary

  • State the unit once. Keep yen values as is and round only for display.
  • Show missing values as "—" with a reason when known, and break chart lines at gaps.
  • Keep accounting-standard rows, the source, and the retrieval time near the table.
  • On phones, scroll the table inside its box with a sticky label column, and redraw charts to fit their container.

Related

A Japanese-language walkthrough with screenshots, including theme switching and saved display settings, is on Qiita.

Before you read the numbers

Points about the endpoints in this article that are easy to misread as wrong data.

  • By designTDnet-derived information is returned 24 hours after disclosure

    Under Article 7(1) of the JPX TDnet API service terms, information derived from TDnet (timely disclosures) is returned by the API and MCP 24 hours after the disclosure time (from 2026-11-13). Within 24 hours, rows of timely disclosures, dividends, dividend changes, splits, delisting schedules, earnings-release periods and earnings forecasts are left out, and TDnet PDFs (filing-document) return 403 tdnet_embargo with the time they become available (availableAt). Latest values (quote, key-metrics-latest, screener and so on) have no previous value to fall back to, so for stocks with a TDnet document in the last 24 hours the fields computed from documents (PER, PBR, dividend yield, market cap and so on) are null; prices and price changes are unaffected. The response headers X-TDnet-Embargoed-Count, X-TDnet-Embargoed-Symbols and X-TDnet-Embargo-Next-Release tell what was held back and when it becomes available. The boundary is disclosure time + 24 hours <= response time, compared in absolute time rather than Japan time. For shareholder benefits and dividend policies, versions sourced from TDnet are held back for 24 hours and the previous version is returned when there is one (versions from EDINET or company IR pages are not affected). Rows whose TDnet disclosure time is unknown are not returned. Calls whose whole content is held back (a list that is empty only because of this rule, or a single stock whose affected latest fields are all null) do not use tokens; calls where only part is held back do. EDINET filings (annual, extraordinary and large-holding reports) and stock prices are not affected.

    Endpoints:/disclosures/events-feed/filing-document/dividend-changes/dividends/dividends-calendar/dividends-bulk/dividend-streaks/splits/delisting-schedule/income-statement/balance-sheet-statement/cash-flow-statement/key-metrics/income-statement-short/balance-sheet-statement-short/cash-flow-statement-short/key-metrics-short/key-metrics-bulk/financial-statement-full/earnings-forecast/sga-breakdown/valuation-history/market-cap-history/quote/key-metrics-latest/batch-quote/batch-key-metrics-latest/market-capitalization/profile/screener/rankings/peers/screener-presets/industry-benchmarks/shareholder-benefits/shareholder-benefits-list/dividend-policy/dividend-policies

  • By designTOKYO PRO Market companies have no financials

    TOKYO PRO Market (the market for professional investors) companies file no XBRL results, so their financials are not ingested; statements and the metrics and market capitalization calculated from financials or share counts are empty or null. Describe them as "financials not covered", not as missing data. Market-wide aggregates (rankings, market-breadth and so on) also exclude this market by default.

    Endpoints:/income-statement/balance-sheet-statement/cash-flow-statement/income-statement-short/balance-sheet-statement-short/cash-flow-statement-short/financial-statement-full/key-metrics/key-metrics-short/key-metrics-latest/market-capitalization/market-cap-history/valuation-history/profile

  • By designRight after listing, prior-year income and ratios can be empty

    The first earnings release after listing does not include full-year income for the prior year, so for newly listed companies the pre-listing income statement is empty and the prior-year row has only total assets and net assets. Before the first results, market cap and PER/PBR history are empty too. Describe it as "income before listing not covered".

    Endpoints:/income-statement/income-statement-short/valuation-history/market-cap-history/key-metrics-short

  • By designQuarterly income figures are year to date

    Q2 and Q3 income and cash-flow figures are cumulative from the start of the fiscal year. Listing them as single-quarter revenue makes Q3 look large. Subtract the previous quarter's cumulative value to get a single quarter, and use key-metrics for trailing-twelve-month (TTM) values.

    Endpoints:/income-statement/cash-flow-statement/income-statement-short/cash-flow-statement-short/key-metrics

  • By designPeriods before and after a switch from consolidated to standalone do not connect

    Each statement period carries a consolidation flag (consolidated or nonconsolidated). For companies that moved from consolidated to standalone reporting, or that became a different business through a share exchange, the reporting scope changes at that point, so prior-period-end values and growth rates do not connect across it. Align consolidation before comparing across periods.

    Endpoints:/income-statement/balance-sheet-statement/cash-flow-statement/income-statement-short/balance-sheet-statement-short/cash-flow-statement-short/financial-statement-full

  • By designJPY amounts and missing-field reasons in foreign-currency statements

    reportedCurrency identifies the statement currency. Available JPY amounts are returned. nullReasons identifies missing fields, including non_jpy_material for unavailable JPY amounts and source_missing:operating_income when the statement lacks operating income used for the margin. Foreign-currency rows without any JPY amount retain nullReason = non_jpy_material.

    Endpoints:/income-statement/balance-sheet-statement/cash-flow-statement

  • By designGross profit scope differs for companies with other operating revenue

    For companies that report operating revenue (such as retailers), revenue = net sales (netSales) + other operating revenue (otherOperatingRevenue), and whether grossProfit includes the latter depends on the company (grossProfitIncludesOtherOperatingRevenue). Use operatingGrossProfit (or grossProfit when it is null) to compare companies. Adding other operating revenue to grossProfit before subtracting SG&A can count it twice.

    Endpoints:/income-statement/income-statement-short/financial-statement-full

  • By designFor annual reports with both Japanese GAAP and IFRS statements, financial-facts and the statements can look different

    For companies whose annual report includes both Japanese GAAP and IFRS statements (2130, 436A, 4494, 6532 and others), the summary of business results in financial-facts comes from the Japanese GAAP tables, while balance-sheet-statement and the other statement endpoints use the IFRS tables the company has adopted, so totals such as total assets can look different. Both are as filed. accountingStandard in financial-facts is the standard declared for the whole document, so rows with Japanese GAAP tags also show IFRS. Check which table a value comes from by its tag name, not by accountingStandard. A trailing _notes in a tag name is added when ZENITH ingests the data and is not part of the original tag.

    Endpoints:/financial-facts/balance-sheet-statement/income-statement/cash-flow-statement

  • Easy to misreadOperating income is not always gross profit minus SG&A

    Under Japanese GAAP, operating income = (operatingGrossProfit ?? grossProfit) − SG&A − (otherOperatingExpenses ?? 0). For companies with other operating revenue or with operating-expense lines besides SG&A, computing only grossProfit − SG&A does not match and looks like an error. Use this formula when you check the numbers.

    Endpoints:/income-statement/income-statement-short/financial-statement-full

  • Easy to misreadEPS can be negative even with positive net income

    Companies that deduct dividends on class shares when computing common-share EPS can show negative EPS even with positive net income, as in their earnings releases (7412 and 8836). A sign difference between net income and EPS is not an error by itself.

    Endpoints:/income-statement/key-metrics

  • Easy to misreadactualEps and estimateEps in earnings-calendar are for the quarter alone, not year to date or full year

    actualEps (reported) and estimateEps (estimate) in earnings-calendar are both earnings per share (yen) for that quarter alone (three months). Rows whose fiscalPeriod is FY also cover only the fourth quarter, not the full year. estimateEps is the market consensus, not the company forecast. Quarterly EPS in income-statement is cumulative from the start of the fiscal year, so the values differ (for 6230 in Q2, actualEps is 21.16 and the year-to-date figure is 38.27). Use the same basis, single quarter or year to date and full year, when you compare. Values are null for rows before the announcement, for reported rows whose results are not in yet, and for issues or periods without an estimate.

    Endpoints:/earnings-calendar/income-statement/income-statement-short

  • FixedStandalone income for periods with a first subsidiary at year end is back

    When a company acquired its first subsidiary at year end, the annual report had a consolidated balance sheet only and standalone income and cash-flow statements only, and those periods were missing entirely from the annual income and cash-flow data (12 periods, including 5572, 9262, 7370 and 3370). Those periods now return income and cash flow flagged consolidation: nonconsolidated, while the same period's balance sheet is consolidated. Mind the flag when comparing with adjacent periods.

    Fixed in: version 79 and data platform #3177 (2026-11-03)Endpoints:/income-statement/cash-flow-statement/income-statement-short/cash-flow-statement-short

  • FixedPeriods with no values are no longer returned

    Previously, rows for periods with every value null and no source could be returned (some cash-flow periods for 648A and 624A, for example). Since version 48, periods with no values are not returned (except non-yen periods, which come with nullReason). An all-null row in an older response does not mean results existed for that period.

    Fixed in: version 48 (2026-11-02)Endpoints:/income-statement/balance-sheet-statement/cash-flow-statement/income-statement-short/balance-sheet-statement-short/cash-flow-statement-short/financial-statement-full

visibility_off
The screens and numbers in these articles leave out stock prices and metrics calculated from them. Before showing live data on your own screens, check what you may display. What you can display
gavel

Disclaimer

This page explains how to use a Japanese equity data API and how its data is defined. It is not a solicitation to invest or a recommendation to buy or sell any security. The content reflects information at the time of writing and is not guaranteed to be accurate or complete. Investment decisions are your own responsibility.

What you may show or provide to third parties depends on your plan and Article 8 of the Terms. Exchange data such as stock prices may not be shown to third parties on any plan. Edited or processed information from which the original stock prices or similar market data can be readily reconstructed is treated as exchange data and may not be displayed or redistributed to third parties. No plan or separate agreement with us overrides this restriction. Terms, Article 8 · Data sources and terms of use