Closed eblondel closed 6 months ago
Author: Alexandre Bennici @abennici Date of creation: 2021-12-03T15:18:41.573+0000 Last update: 2021-12-03T15:18:41.573+0000
Globally to use the line_chart module, you have 2 thinks to manage (you can show an example below:
in UI part :
line_chart_ui(ns("sp"),sliderWidth =25)
-dont forget to include your id in ns()
-sideWidth provide you capacity to adjust width of sidebar include in the box
in server part:
line_chart_server(id="sp", df=data_logbooks, label="Species",colDate = "date",colTarget="species_desc",colValue="quantity",colText="text", rank=TRUE,nbToShow=5,rankLabel="Display x most caught species:",mode='plot+table')
id :should be the same of the ui part, do not include it in ns() in server part
data: it is you raw data to execute analysis, it must contain column information about date (ISO format), variables to project in x, y and legend (target)
label: it is the name use to rename target column in final table (if you include a table view)
colDate: column name for x axis
colValue: column name for y axis
colTarget:coumn name use to split and color in legend (here Species)
colText : is optional,you can use that to display other information in markers e.g for species concatenate english name, scientific name and asfis code
rank, is booleen if you want add capacity to have a button in sidebar to rank value and selecte a max number to display
nbToShow :is the max number to dislay if rank =T
rankLabel could be use to change the default label link to nbToShow
mode :allow capacity to dislay plot('plot'), table('table') or both('plot+table','table+plot'),if this case plot and table are wrap in a tabset ,order of element indicate order of tab
Author: Alexandre Bennici @abennici Date of creation: 2021-12-03T15:20:39.816+0000 Last update: 2021-12-03T15:20:39.816+0000
You have an example in core module 'logbook_overview', concretely you can do the same with a previous step with filter data with a specific vessel registration number
The purpose of this improvement will be to extend the work done in CALR-15 with the work of [~alexandre.bennici@fao.org] on CALR-23, where advanced statistics chart handling is done with shinydashboardPlus.