diff --git a/docs/userGuide/usingHtmlJavaScriptCss.md b/docs/userGuide/usingHtmlJavaScriptCss.md index 3d67b3e1d8..f31672e7c2 100644 --- a/docs/userGuide/usingHtmlJavaScriptCss.md +++ b/docs/userGuide/usingHtmlJavaScriptCss.md @@ -5,6 +5,7 @@ title: "User Guide: {{ title }}" layout: userGuide.md + pageNav: 2 @@ -18,6 +19,8 @@ **A MarkBind source file can contain a mixture of HTML, JavaScript, and CSS** as a normal web page would. +## Markdown in HTML + ==Text within HTML tags are considered plain text unless the text is preceded by a blank line,== in which case the text is parsed as Markdown text.
@@ -61,5 +64,89 @@ Alternatively, you can use `` (for _block_ Markdown elements such as h
+## JavaScript libraries + +External JavaScript libraries can be included in MarkBind to add a wide range of features and functionalities. One such use case is to add a charting library for data visualization. + +### Charts + +Popular chart libraries such as [Chart.js](https://www.chartjs.org/) and [Apache ECharts](https://echarts.apache.org) can be used in MarkBind to create beautiful charts, similar to how they are used in any HTML web page. The details of how to use these libraries are beyond the scope of this section, but you can find more information on their websites. In general, you will perform these 3 steps: + +1. Import the library via a CDN or locally. +1. Specify a target HTML element to render the chart. +1. Initialize the chart with the data and options. + + + +As mentioned in the [above section](#markdown-in-html), you **should not** leave any blank lines within HTML elements to prevent MarkBind from parsing the contents as Markdown instead of code/text. + + +{{ icon_example }} Here is an example of how to use Chart.js to create a pie chart. + + +HTML + + + +
+ +
+ +
+
+ +{{ icon_example }} Here is an example of how to use Apache ECharts to create a bar chart. + + +HTML + + +
+ +
+
+ {% from "njk/common.njk" import previous_next %} {{ previous_next('components/advanced', 'tweakingThePageStructure') }}