Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Cannot display French properly #38

Open
zrx8269 opened this issue Oct 21, 2021 · 0 comments
Open

Cannot display French properly #38

zrx8269 opened this issue Oct 21, 2021 · 0 comments

Comments

@zrx8269
Copy link

zrx8269 commented Oct 21, 2021

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

image

Any suggestions for this case? Many Thanks.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant