Use encoded arrays in the high-level Chart API
devPlotly.NET supports passing encoded arrays (optimized data structures) directly into high-level Chart.* constructors. To avoid confusion with plain array inputs, the API uses specific encoded-only overloads.
Key Rules for Encoded Overloads:
- Explicit Parameters: Encoded overloads use specific parameter names like
xEncoded,yEncoded, orzEncoded. - No Mixing: An encoded overload will not expose the corresponding plain
x,y, orzparameters in the same signature. This prevents ambiguity between plain and encoded data. - No Tuples: Encoded overloads do not support tuple-based or zipped inputs; they are designed for direct encoded array arguments.
- Precedence: If both plain and encoded values are provided (e.g., via lower-level object manipulation), the encoded value takes precedence during serialization.
Common Chart Patterns:
- Scatter:
Chart.Scatter(xEncoded, yEncoded, ?Mode, ?Name, ...) - Bar:
Chart.Bar(valuesEncoded, ?keysEncoded, ?MultiWidthEncoded, ?Name, ...) - Heatmap:
Chart.Heatmap(zEncoded, ?xEncoded, ?yEncoded, ?Name, ...)
// Example intended usage pattern
Chart.Scatter(xEncoded, yEncoded, Mode.Lines, "My Encoded Scatter")