Cannot display French properly
zrx8269 opened this issue · 0 comments
zrx8269 commented
Hi,
In my project, I need to display French, but I always get the following error
Failed to render the graph. It is probably too large. Original error: Error: syntax error in line 27 near 'à' at render
(http://localhost:15966/session/viewhtml64ca72d45c09/lib/viz.js-2.1.2/full.render.js:50:11) at
http://localhost:15966/session/viewhtml64ca72d45c09/lib/viz.js-2.1.2/viz.js:122:19 at new Promise (<anonymous>) at
ModuleWrapper.render (http://localhost:15966/session/viewhtml64ca72d45c09/lib/viz.js-2.1.2/viz.js:120:14) at
PAViz.renderString (http://localhost:15966/session/viewhtml64ca72d45c09/lib/viz.js-2.1.2/viz.js:283:29) at
PAViz.renderSVGElement (http://localhost:15966/session/viewhtml64ca72d45c09/lib/viz.js-2.1.2/viz.js:290:21) at
PARendererGraphviz.render (http://localhost:15966/session/viewhtml64ca72d45c09/lib/processanimater-libs-1.0.3/animation_renderer_graphviz.js:89:9) at Object.renderValue (http://localhost:15966/session/viewhtml64ca72d45c09/lib/processanimateR-binding-1.0.4/processanimateR.js:47:18) at
Object.renderValue (http://localhost:15966/session/viewhtml64ca72d45c09/lib/htmlwidgets-1.5.4/htmlwidgets.js:886:25) at
http://localhost:15966/session/viewhtml64ca72d45c09/lib/htmlwidgets-1.5.4/htmlwidgets.js:653:19
Sample Data
patient.csv
#install.packages(c("bupaR","processanimateR"))
library(bupaR)
library(processanimateR)
data <- read.csv('Downloads/patient.csv', stringsAsFactors = FALSE)
data$timestamp <- as.POSIXct(data$timestamp, tz="UTC", format="%Y-%m-%dT%H:%M:%SZ")
data$activity <-as.character(data$activity)
Encoding(data$activity) <- 'UTF-8'
data <- eventlog(data,
case_id = "patient",
activity_id = "activity",
activity_instance_id = "activity_instance",
lifecycle_id = "status",
timestamp = "timestamp",
resource_id = "resource"
)
graph <- processmapR::process_map(data, render = F, type = frequency("absolute", color_scale = "Blues"))
model <- DiagrammeR::add_global_graph_attrs(graph, attr = "rankdir", value = "TB", attr_type = "graph")
animate_process(data, model, initial_state="paused")
I have found that it is caused by the single quote "'" in this word "D'arrivée à la porte".
If I replace this word with "D\'arrivée à la porte", it will display a double quotes, which is not what we want
Any suggestions for this case? Many Thanks.