Use multiple subscripts in graphs.csv
#565
-
|
Hi, I have successfully transformed my Vensim model into a running JavaScript app, but I had to simplify my model by suppressing multiple subscripts.
This does not work: 1,,Graphs,Pop,,,,line,,,,,,,,,,,,0,,,,,,,Pop[China,LV],,line,PopChina,blue,,,PopObs[China,LV],,dotted,PopObsChina,red,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,whereas this works fine: 1,,Graphs,Pop,,,,line,,,,,,,,,,,,0,,,,,,,Pop1[China],,line,PopChina,blue,,,PopObs1[China],,dotted,PopObsChina,red,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,with |
Beta Was this translation helpful? Give feedback.
Replies: 1 comment 1 reply
-
|
Hi @LSarribouette,
Yes, the issue you're running into is that in the CSV format, when you have a cell that includes commas, you need to "escape" the text in that cell with double quotes. (See this SO answer about different escaping options.) In your example, you'll need to use 1,,Graphs,Pop,,,,line,,,,,,,,,,,,0,,,,,,,"Pop[China,LV]",,line,PopChina,blue,,,"PopObs[China,LV]",,dotted,PopObsChina,red,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,Note that
You can use up to 8 subscripts.
Unfortunately, no. I should probably remove that column name because I see now that it can be confusing, and it's not actually used by |
Beta Was this translation helpful? Give feedback.
Hi @LSarribouette,
Yes, the issue you're running into is that in the CSV format, when you have a cell that includes commas, you need to "escape" the text in that cell with double quotes. (See this SO answer about different escaping options.)
In your example, you'll need to use
"Pop[China,LV]"and"PopObs[China,LV]"like this:Note that
@sdeverywhere/plugin-configuses CSV format for config files because it's b…