Skip to content

Commit

Permalink
Merge pull request #108 from nzzdev/release-1.10.2
Browse files Browse the repository at this point in the history
Release 1.10.2
  • Loading branch information
Sharon Funke authored Nov 21, 2019
2 parents c8b5ac5 + 833b51c commit 8ffd9bf
Show file tree
Hide file tree
Showing 7 changed files with 39 additions and 5 deletions.
15 changes: 15 additions & 0 deletions .vscode/launch.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
{
// Use IntelliSense to learn about possible attributes.
// Hover to view descriptions of existing attributes.
// For more information, visit: https://go.microsoft.com/fwlink/?linkid=830387
"version": "0.2.0",
"configurations": [
{
"type": "node",
"request": "launch",
"name": "Launch Program",
"program": "${workspaceFolder}/dev.js",
"runtimeVersion": "10.16.1"
}
]
}
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
# Q Quiz [![Build Status](https://travis-ci.com/nzzdev/Q-quiz.svg?token=bwR7zbPTTpEoDxbY2dJR&branch=dev)](https://travis-ci.com/nzzdev/Q-quiz) [![Greenkeeper badge](https://badges.greenkeeper.io/nzzdev/Q-quiz.svg?token=0092ccff54931fc37f0887dd73f1a0bd550f584c80482e40fde8768e26d885ac&ts=1551342745740)](https://greenkeeper.io/)

**Maintainer**: [manuelroth](https://github.com/manuelroth)
**Maintainer**: [Sharon Funke](https://github.com/fuenkchen)

Q Quiz is one tool of the Q toolbox to render quizes containing questions of type multiple choice, number guess and map point guess. It also includes the rendering of answer statistics for each question type. Test it in the [playground](https://q-playground.st.nzz.ch/).

Expand Down
2 changes: 1 addition & 1 deletion package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@nzz/q-quiz",
"version": "1.10.1",
"version": "1.10.2",
"description": "Q quiz",
"keywords": [
"storytelling",
Expand Down
15 changes: 15 additions & 0 deletions resources/fixtures/data/strip-plot-number-guess.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
{
"title": "FIXTURE: Number guess - stripplot",
"elements": [
{
"id": "5-1574250413809-187227046",
"type": "numberGuess",
"articleRecommendations": [],
"question": "Wie viele",
"answer": 75,
"min": 1,
"max": 150,
"step": 1
}
]
}
7 changes: 5 additions & 2 deletions routes/answer-service/number-guess.js
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,7 @@ function getStripplotSvg(data, stats, plotWidth) {
.domain([0, d3.max(stats, d => parseInt(d.count))])
.range([height, 0]);

let element = window.document.createElement("div");
let element = dom.window.document.createElement("div");

let svg = d3
.select(element)
Expand Down Expand Up @@ -143,7 +143,10 @@ function getBarchartSvg(data, stats, chartWidth) {
.scaleLinear()
.domain([
0,
Math.max(200 / stats.length, d3.max(stats, d => parseInt(d.count)))
Math.max(
200 / stats.length,
d3.max(stats, d => parseInt(d.count))
)
])
.range([height, 0]);

Expand Down
1 change: 1 addition & 0 deletions routes/fixtures/data.js
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@ const fixtureData = [
require(`${fixtureDataDirectory}/cover-with-title-no-last-card.json`),
require(`${fixtureDataDirectory}/single-multiple-choice.json`),
require(`${fixtureDataDirectory}/single-number-guess.json`),
require(`${fixtureDataDirectory}/strip-plot-number-guess.json`),
require(`${fixtureDataDirectory}/single-map-point-guess.json`),
require(`${fixtureDataDirectory}/single-map-point-guess-low-zoomlevel.json`),
require(`${fixtureDataDirectory}/single-map-point-guess-high-zoomlevel.json`)
Expand Down

0 comments on commit 8ffd9bf

Please sign in to comment.