Zum Hauptinhalt springen

setLocale()

Beschreibung

Wendet eine neue Locale auf Pivot an

Verwendung

setLocale(null | locale?: object): void;

Parameter

  • null - (optional) setzt auf die Standard-Locale zurück (Englisch)
  • locale - (optional) das Objekt mit den Daten der neuen Locale, die angewendet werden soll

Beispiel

// Pivot erstellen
const table = new pivot.Pivot("#root", {
fields,
data: dataset,
config: {
rows: ["studio", "genre"],
columns: [],
values: [
{
field: "title",
method: "count"
},
{
field: "score",
method: "max"
}
]
}
});

// die Locale "de" auf Pivot anwenden
table.setLocale(pivot.locales.de);

// die Standard-Locale auf Pivot anwenden
table.setLocale(); // oder setLocale(null);

Verwandte Artikel: