@plotset/cli
v0.0.43
Published
## How to use
Downloads
79
Readme
Plotset
How to use
Install the package with
- step 1
npm uninstall -g cli-plotset
- step 2
npm i -g @plotset/cli
orsudo npm i -g @plotset/cli
Login
login on production (publish your chart on the main site https://plotset.com)
plotset login
login on stage (publish your chart on staging https://pss.pro.ai)
plotset login-stage
new template
plotset new
with this commend ploset generated template in current directory.
the template includes the following files (in src folder).
- css(folder)
- Write the code css in this folder and import in src/css/main.css.
- You automatically have access to your class inside index.html.
- js(folder)
- Write the code javascript in this folder and import in src/js/index.js.
- You must have this methods which we will discuss in the following.
method | when run this method in base plotset? | required
--- | --- | ---
init_handler | first time
change data
change col rel(bindings)
| true
transformData | first time
change data
change col rel(binding)
| false
change_config_handler | change config(setting)
| true
resizeHandler | resize iframe
| true
- index.html
- Inside this file you can write html code and add external modules.
- Be sure to add module https://plotset.com/charts/js/base-cafedata/v1.0.0.js.
- bindings.json
⋅⋅⋅ ⋅⋅
- data.csv
default data template.
- info.json
you must enter the name and category of the template in this file.
- settings.json
- this file puts your template settings and inputs into poltset.com and allows you to change the settings.
- you must also enter the default value of the template settings in this file.
- thumbnail.png
this is a preview of your template image on plotset.com.
publish
publish on production (https://plotset.com)
plotset publish-production
publish on stage (https://pss.pro.ai). You don't need to update your template version for this.
plotset publish
enter template id
if you want update your template or enter new
if you have new template.
note: if exist templateId field in this file directoryTemplate/plotset.json
The templateId is automatically read from there.
sample plotset.json
{
"templateId": 102
}