Class CanvasChartStyleRoutes

java.lang.Object
com.inductiveautomation.perspective.gateway.comm.CanvasChartStyleRoutes

public class CanvasChartStyleRoutes extends Object
Serves ECharts theme JSON for canvas charts.

CanvasChartStyleManager owns the CanvasChartStyleConfig resources and resolves the requested name to one of them; this route serves the result so the front-end's useChartStyle hook can register it with ECharts.

There are two routes because a request names either a style or a Perspective theme, and the two namespaces overlap: style/light is the bundled light style, while theme/light is whichever style is assigned to the light theme. The kind is part of the path so the two never share a cached response.

Each URL embeds the requested name and a gateway-wide content hash. Responses for the current hash are immutable; any content change yields a new hash and so a new URL. Stale hashes are served no-cache. A session resolves its style once, at load, from the hash it received.

  • Constructor Details

  • Method Details