Skip to content

Commit

Permalink
DATASHADES-327 / update doc, part 1
Browse files Browse the repository at this point in the history
  • Loading branch information
mutantsan committed May 28, 2024
1 parent a028a5e commit 1306e7a
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -124,7 +124,7 @@ class ObservableBarForm(BaseChartForm):
]
```

Another step is to register JS/CSS vendor libraries of the chart you want to use. Refer to (CKAN documentation)[https://docs.ckan.org/en/latest/theming/webassets.html] to read about adding CSS and JavaScript files using Webassets.
Another step is to register JS/CSS vendor libraries of the chart you want to use. Refer to [CKAN documentation](https://docs.ckan.org/en/latest/theming/webassets.html) to read about adding CSS and JavaScript files using Webassets.

You also will need a CKAN JS module, that will be responsible for rendering the Chart. This module must be registered inside a `webassets.yml` as well.
```js
Expand Down Expand Up @@ -176,6 +176,8 @@ And an HTML file, that will provide a proper container and include your JS modul

Note, that we should add `{% asset "charts/observable" %}` not only here, but in `charts_form.html` too.

The reason for having a separate `HTML` file and `JS` module is that different libraries may require different types of container elements (such as div, canvas, etc.) to initialize or may need additional boilerplate code to build a chart. There's no easy way to abstract this, so you have to implement these things yourself.

## Developer installation

To install ckanext-charts for development, activate your CKAN virtualenv and
Expand Down

0 comments on commit 1306e7a

Please sign in to comment.