Skip to content

Commit 8120493

Browse files
authored
Merge pull request #5784 from plotly/emoji-color-test
Improve baseline system and add test for emoji with color
2 parents 87b8492 + 465ca58 commit 8120493

File tree

3 files changed

+66
-1
lines changed

3 files changed

+66
-1
lines changed

.circleci/env_image.sh

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
#!/bin/sh
2-
sudo apt-get install fonts-liberation2 fonts-open-sans fonts-noto-cjk && \
2+
sudo apt-get install fonts-liberation2 fonts-open-sans fonts-noto-cjk fonts-noto-color-emoji && \
33
sudo python3 .circleci/download_google_fonts.py && \
44
sudo cp -r .circleci/fonts/ /usr/share/ && \
55
sudo fc-cache -f && \

test/image/baselines/worldcup.png

74.3 KB
Loading

test/image/mocks/worldcup.json

Lines changed: 65 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,65 @@
1+
{
2+
"data": [
3+
{
4+
"orientation": "h",
5+
"type": "bar",
6+
"marker": { "color": "lightblue" },
7+
"textangle": 0,
8+
"textposition": "inside",
9+
"textfont": {
10+
"color": "white",
11+
"size": 32
12+
},
13+
"text": [
14+
"1958 | 1962 | 1970 | 1994 | 2002 🇧🇷",
15+
"1954 | 1974 | 1990 | 2014 🇩🇪",
16+
"1934 | 1938 | 1982 | 2006 🇮🇹",
17+
"1930 | 1950 🇺🇾",
18+
"1998 | 2018 🇫🇷",
19+
"1974 | 1986 🇦🇷",
20+
"1966 🏴󠁧󠁢󠁥󠁮󠁧󠁿",
21+
"2010 🇪🇸"
22+
],
23+
"y": [
24+
"Brazil",
25+
"Germany",
26+
"Italy",
27+
"Uruguay",
28+
"France",
29+
"Argentina",
30+
"England",
31+
"Spain"
32+
],
33+
"x": [5, 4, 4, 2, 2, 2, 1, 1]
34+
}
35+
],
36+
"layout": {
37+
"title": {
38+
"text": "<b>FIFA 🌎 World Cup 🏆 winners</b>",
39+
"font": {
40+
"size": 40,
41+
"color": "gray"
42+
}
43+
},
44+
"width": 600,
45+
"height": 600,
46+
"margin": {
47+
"l": 20,
48+
"r": 20
49+
},
50+
"yaxis": {
51+
"ticklabelposition": "inside",
52+
"autorange": "reversed"
53+
},
54+
"xaxis": {
55+
"zeroline": false,
56+
"range": [-1, 6],
57+
"tickvals": [0, 1, 2, 3, 4, 5],
58+
"ticktext": ["😐", "🙂", "😊", "🤨", "😃", "😎"],
59+
"tickfont": { "size": 32 },
60+
"title": {
61+
"text": "<br><b>An interactive Plotly graph</b>"
62+
}
63+
}
64+
}
65+
}

0 commit comments

Comments
 (0)