You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
because the library always assumes data would be in the resources attribute of the spec.
Tasks
...
Acceptance criteria
Different kinds of plotly charts are rendered without exceptions
Analysis
There are several ways to solve the problem:
allow plotly spec to have data where it has it - in the view spec itself => update both datapackage-views-js and datapackage-render-js to allow empty "resources" property
add the mapping functionality for different types of graphs: there is already plotlyToPlotly function doing that, but it doesn't account for the case with e.g. pie charts (data is located in different attribute - "values", instead of "x" and "y")
Except pie charts there are other types, e.g. heatmap, that use yet another different place in the specs for values, that's why the first approach seems better.
The text was updated successfully, but these errors were encountered:
Turned out I can already create a view spec with data at plotly specific place - if I specifiy some unused mock resource, so this issue is not a blocker, but would be nice to have to keep specs cleaner.
While trying to render a spec without resources property, e.g. plotly spec that has all the data inside the spec attribute:
there is an error:
which comes from App.js in
datapackage-views-js
:and if you try to put empty resource in the spec, then there will be another error:
from
datapackage-render-js
in view.js:because the library always assumes data would be in the resources attribute of the spec.
Tasks
Acceptance criteria
Analysis
There are several ways to solve the problem:
datapackage-views-js
anddatapackage-render-js
to allow empty "resources" propertyExcept pie charts there are other types, e.g. heatmap, that use yet another different place in the specs for values, that's why the first approach seems better.
The text was updated successfully, but these errors were encountered: