chore(learn): Applied MDX format to Chinese curriculum files (#40462)
This commit is contained in:
@ -1,58 +1,52 @@
|
||||
---
|
||||
id: bd7168d8c242eddfaeb5bd13
|
||||
title: 用条形图可视化数据
|
||||
challengeType: 3
|
||||
forumTopicId: 301464
|
||||
title: 用条形图可视化数据
|
||||
---
|
||||
|
||||
## Description
|
||||
<section id='description'>
|
||||
<strong>目标:</strong>在 <a href='https://codepen.io' target='_blank'>CodePen.io</a> 上实现一个功能类似 <a href='https://codepen.io/freeCodeCamp/full/GrZVaM' target='_blank'>https://codepen.io/freeCodeCamp/full/GrZVaM</a> 的 App。
|
||||
在满足以下<a href='https://en.wikipedia.org/wiki/User_story' target='_blank'>需求</a>并能通过所有测试的前提下,你可以根据自己的喜好来美化你的 app。
|
||||
你可以使用 HTML、JavaScript、CSS、以及基于 svg 的 D3 可视化库来完成这个挑战。该任务需要使用 D3 的坐标轴属性生成坐标轴,这个属性会自动生成沿轴的刻度。这些刻度是通过 D3 测试所必需的,因为它们的位置是用来确定图表元素的对齐方式。你可以在这里 <a href='https://github.com/d3/d3/blob/master/API.md#axes-d3-axis' target='_blank'>https://github.com/d3/d3/blob/master/API.md#axes-d3-axis</a> 获取关于生成坐标轴的信息。每次测试查询的元素都必须是非虚拟 DOM。 如果你使用了前端框架(例如 Vue),那么对于动态的内容测试结果可能不准确。我们希望最终能够兼容这些框架,但 D3 项目目前还不支持它们。
|
||||
<strong>需求 #1:</strong>我的图表应该有一个具有<code>id="title"</code>属性的标题。
|
||||
<strong>需求 #2:</strong>我的图表应该有一个<code>g</code>元素作为 x 轴,并具有<code>id="x-axis"</code>属性。
|
||||
<strong>需求 #3:</strong>我的图表应该有一个<code>g</code>元素作为 y 轴,并具有<code>id="y-axis"</code>属性。
|
||||
<strong>需求 #4:</strong>两个轴都应包含多个刻度标签,每个标签具有<code>class="tick"</code>属性
|
||||
<strong>需求 #5:</strong>在我的图表里,每个数据点都应该有一个具有<code>class="bar"</code>属性的<code>rect</code>元素来展示数据。
|
||||
<strong>需求 #6:</strong>每一栏应该具有包含日期的<code>data-date</code>属性以及包含 GDP 值的<code>data-gdp</code>属性。
|
||||
<strong>需求 #7:</strong>条形元素的<code>data-date</code>属性应与提供的数据的顺序相匹配。
|
||||
<strong>需求 #8:</strong>条形元素的<code>data-gdp</code>属性应与提供的数据的顺序相匹配。
|
||||
<strong>需求 #9:</strong>每个条形元素的高度应准确地表示其数据所对应的 GDP 值。
|
||||
<strong>需求 #10:</strong><code>data-date</code>属性和它对应的条形元素应与 x 轴上的相应的值对齐。
|
||||
<strong>需求 #11:</strong><code>data-gdp</code>属性和它对应的条形元素应与 y 轴上的相应的值对齐。
|
||||
<strong>需求 #12:</strong>我可以将鼠标悬停在某个区域上,并查看具有<code>id="tooltip"</code>属性的提示框,它会显示有关该区域的更多信息。
|
||||
<strong>需求 #13:</strong>我的提示框应该有一个<code>data-date</code>属性,它对应了当前激活区域的<code>data-date</code>属性。
|
||||
以下是完成此项目所需的数据:<code>https://raw.githubusercontent.com/freeCodeCamp/ProjectReferenceData/master/GDP-data.json</code>
|
||||
你可以 fork <a href='https://codepen.io/freeCodeCamp/pen/MJjpwO' target='_blank'>这个 CodePen pen 项目</a>来构建你的项目。或者你可以在任何你喜欢的环境中使用以下 CDN 链接来运行测试:<code>https://gitcdn.link/repo/freeCodeCamp/testable-projects-fcc/master/build/bundle.js</code>.
|
||||
# --description--
|
||||
|
||||
**目标:** 在 [CodePen.io](https://codepen.io) 上实现一个功能类似 <https://codepen.io/freeCodeCamp/full/GrZVaM> 的 App。
|
||||
|
||||
在满足以下[需求](https://en.wikipedia.org/wiki/User_story)并能通过所有测试的前提下,你可以根据自己的喜好来美化你的 app。
|
||||
|
||||
你可以使用 HTML、JavaScript、CSS、以及基于 svg 的 D3 可视化库来完成这个挑战。该任务需要使用 D3 的坐标轴属性生成坐标轴,这个属性会自动生成沿轴的刻度。这些刻度是通过 D3 测试所必需的,因为它们的位置是用来确定图表元素的对齐方式。你可以在这里 <https://github.com/d3/d3/blob/master/API.md#axes-d3-axis> 获取关于生成坐标轴的信息。每次测试查询的元素都必须是非虚拟 DOM。 如果你使用了前端框架(例如 Vue),那么对于动态的内容测试结果可能不准确。我们希望最终能够兼容这些框架,但 D3 项目目前还不支持它们。
|
||||
|
||||
**需求 #1:** 我的图表应该有一个具有`id="title"`属性的标题。
|
||||
|
||||
**需求 #2:** 我的图表应该有一个`g`元素作为 x 轴,并具有`id="x-axis"`属性。
|
||||
|
||||
**需求 #3:** 我的图表应该有一个`g`元素作为 y 轴,并具有`id="y-axis"`属性。
|
||||
|
||||
**需求 #4:** 两个轴都应包含多个刻度标签,每个标签具有`class="tick"`属性
|
||||
|
||||
**需求 #5:** 在我的图表里,每个数据点都应该有一个具有`class="bar"`属性的`rect`元素来展示数据。
|
||||
|
||||
**需求 #6:** 每一栏应该具有包含日期的`data-date`属性以及包含 GDP 值的`data-gdp`属性。
|
||||
|
||||
**需求 #7:** 条形元素的`data-date`属性应与提供的数据的顺序相匹配。
|
||||
|
||||
**需求 #8:** 条形元素的`data-gdp`属性应与提供的数据的顺序相匹配。
|
||||
|
||||
**需求 #9:** 每个条形元素的高度应准确地表示其数据所对应的 GDP 值。
|
||||
|
||||
**需求 #10:** `data-date`属性和它对应的条形元素应与 x 轴上的相应的值对齐。
|
||||
|
||||
**需求 #11:** `data-gdp`属性和它对应的条形元素应与 y 轴上的相应的值对齐。
|
||||
|
||||
**需求 #12:** 我可以将鼠标悬停在某个区域上,并查看具有`id="tooltip"`属性的提示框,它会显示有关该区域的更多信息。
|
||||
|
||||
**需求 #13:** 我的提示框应该有一个`data-date`属性,它对应了当前激活区域的`data-date`属性。
|
||||
|
||||
以下是完成此项目所需的数据:`https://raw.githubusercontent.com/freeCodeCamp/ProjectReferenceData/master/GDP-data.json`
|
||||
|
||||
你可以 fork [这个 CodePen pen 项目](https://codepen.io/freeCodeCamp/pen/MJjpwO)来构建你的项目。或者你可以在任何你喜欢的环境中使用以下 CDN 链接来运行测试:`https://gitcdn.link/repo/freeCodeCamp/testable-projects-fcc/master/build/bundle.js`.
|
||||
|
||||
一旦你完成了本项目并且该项目所有测试运行通过,请提交项目的 URL。
|
||||
</section>
|
||||
|
||||
## Instructions
|
||||
<section id='instructions'>
|
||||
# --hints--
|
||||
|
||||
</section>
|
||||
|
||||
## Tests
|
||||
<section id='tests'>
|
||||
# --solutions--
|
||||
|
||||
```yml
|
||||
tests: []
|
||||
|
||||
```
|
||||
|
||||
</section>
|
||||
|
||||
## Challenge Seed
|
||||
<section id='challengeSeed'>
|
||||
|
||||
</section>
|
||||
|
||||
## Solution
|
||||
<section id='solution'>
|
||||
|
||||
```js
|
||||
// solution required
|
||||
```
|
||||
|
||||
</section>
|
||||
|
@ -1,56 +1,51 @@
|
||||
---
|
||||
id: 587d7fa6367417b2b2512bbf
|
||||
title: 用地区分布图可视化数据
|
||||
challengeType: 3
|
||||
forumTopicId: 301465
|
||||
title: 用地区分布图可视化数据
|
||||
---
|
||||
|
||||
## Description
|
||||
<section id='description'>
|
||||
<strong>目标:</strong>在 <a href='https://codepen.io' target='_blank'>CodePen.io</a> 上实现一个功能类似 <a href='https://codepen.io/freeCodeCamp/full/EZKqza' target='_blank'>https://codepen.io/freeCodeCamp/full/EZKqza</a> 的 App。
|
||||
在满足以下<a href='https://en.wikipedia.org/wiki/User_story' target='_blank'>需求</a>并能通过所有测试的前提下,你可以根据自己的喜好来美化你的 app。
|
||||
你可以使用 HTML、JavaScript、CSS、以及基于 svg 的 D3 可视化库来完成这个挑战。该任务需要使用 D3 的坐标轴属性生成坐标轴,这个属性会自动生成沿轴的刻度。这些刻度是通过 D3 测试所必需的,因为它们的位置是用来确定图表元素的对齐方式。你可以在这里 <a href='https://github.com/d3/d3/blob/master/API.md#axes-d3-axis' target='_blank'>https://github.com/d3/d3/blob/master/API.md#axes-d3-axis</a> 获取关于生成坐标轴的信息。每次测试查询的元素都必须是非虚拟 DOM。 如果你使用了前端框架(例如 Vue),那么对于动态的内容测试结果可能不准确。我们希望最终能够兼容这些框架,但 D3 项目目前还不支持它们。
|
||||
<strong>需求 #1:</strong>我的地区分布图应该有一个具有<code>id="title"</code>属性的标题。
|
||||
<strong>需求 #2:</strong>我的地区分布图应该有一个具有<code>id="description"</code>属性的描述内容。
|
||||
<strong>需求 #3:</strong>我的地区分布图应该有一些州县来展示数据,这些州县应该具有<code>class="county"</code>属性。
|
||||
<strong>需求 #4:</strong>这些州县至少应该有 4 种不同的填充颜色。
|
||||
<strong>需求 #5:</strong>我的每个州县都应该具有<code>data-fips</code>和<code>data-education</code>属性,分别包含他们相应的 fips 值和教育值。
|
||||
<strong>需求 #6:</strong>在我的地区分布图中,每一个提供的数据点都应该有一个对应的州县。
|
||||
<strong>需求 #7:</strong>各个州县应该具有与样本数据匹配的 fips 值和教育值。
|
||||
<strong>需求 #8:</strong>我的地区分布图应该有一个具有<code>id="legend"</code>属性的图例。
|
||||
<strong>需求 #9:</strong>这些图例至少应该使用 4 种不同的填充颜色。
|
||||
<strong>需求 #10:</strong>我可以将鼠标悬停在某个区域上,并查看具有<code>id="tooltip"</code>属性的提示框,它会显示有关该区域的更多信息。
|
||||
<strong>需求 #11:</strong>我的提示框应该有一个<code>data-education</code>属性,它对应了当前激活区域的code>data-education</code>属性。
|
||||
以下是完成此项目所需的数据集:<br><ul><li><strong>US Education Data: </strong><code>https://raw.githubusercontent.com/no-stack-dub-sack/testable-projects-fcc/master/src/data/choropleth_map/for_user_education.json</code></li><li><strong>US County Data: </strong><code>https://raw.githubusercontent.com/no-stack-dub-sack/testable-projects-fcc/master/src/data/choropleth_map/counties.json</code></li></ul>
|
||||
你可以 fork <a href='https://codepen.io/freeCodeCamp/pen/MJjpwO' target='_blank'>这个 CodePen pen 项目</a>来构建你的项目。或者你可以在任何你喜欢的环境中使用以下 CDN 链接来运行测试:<code>https://gitcdn.link/repo/freeCodeCamp/testable-projects-fcc/master/build/bundle.js</code>.
|
||||
# --description--
|
||||
|
||||
**目标:** 在 [CodePen.io](https://codepen.io) 上实现一个功能类似 <https://codepen.io/freeCodeCamp/full/EZKqza> 的 App。
|
||||
|
||||
在满足以下[需求](https://en.wikipedia.org/wiki/User_story)并能通过所有测试的前提下,你可以根据自己的喜好来美化你的 app。
|
||||
|
||||
你可以使用 HTML、JavaScript、CSS、以及基于 svg 的 D3 可视化库来完成这个挑战。该任务需要使用 D3 的坐标轴属性生成坐标轴,这个属性会自动生成沿轴的刻度。这些刻度是通过 D3 测试所必需的,因为它们的位置是用来确定图表元素的对齐方式。你可以在这里 <https://github.com/d3/d3/blob/master/API.md#axes-d3-axis> 获取关于生成坐标轴的信息。每次测试查询的元素都必须是非虚拟 DOM。 如果你使用了前端框架(例如 Vue),那么对于动态的内容测试结果可能不准确。我们希望最终能够兼容这些框架,但 D3 项目目前还不支持它们。
|
||||
|
||||
**需求 #1:** 我的地区分布图应该有一个具有`id="title"`属性的标题。
|
||||
|
||||
**需求 #2:** 我的地区分布图应该有一个具有`id="description"`属性的描述内容。
|
||||
|
||||
**需求 #3:** 我的地区分布图应该有一些州县来展示数据,这些州县应该具有`class="county"`属性。
|
||||
|
||||
**需求 #4:** 这些州县至少应该有 4 种不同的填充颜色。
|
||||
|
||||
**需求 #5:** 我的每个州县都应该具有`data-fips`和`data-education`属性,分别包含他们相应的 fips 值和教育值。
|
||||
|
||||
**需求 #6:** 在我的地区分布图中,每一个提供的数据点都应该有一个对应的州县。
|
||||
|
||||
**需求 #7:** 各个州县应该具有与样本数据匹配的 fips 值和教育值。
|
||||
|
||||
**需求 #8:** 我的地区分布图应该有一个具有`id="legend"`属性的图例。
|
||||
|
||||
**需求 #9:** 这些图例至少应该使用 4 种不同的填充颜色。
|
||||
|
||||
**需求 #10:** 我可以将鼠标悬停在某个区域上,并查看具有`id="tooltip"`属性的提示框,它会显示有关该区域的更多信息。
|
||||
|
||||
**需求 #11:** 我的提示框应该有一个`data-education`属性,它对应了当前激活区域的code>data-education属性。
|
||||
|
||||
以下是完成此项目所需的数据集:
|
||||
|
||||
- **US Education Data:** `https://raw.githubusercontent.com/no-stack-dub-sack/testable-projects-fcc/master/src/data/choropleth_map/for_user_education.json`
|
||||
- **US County Data:** `https://raw.githubusercontent.com/no-stack-dub-sack/testable-projects-fcc/master/src/data/choropleth_map/counties.json`
|
||||
|
||||
你可以 fork [这个 CodePen pen 项目](https://codepen.io/freeCodeCamp/pen/MJjpwO)来构建你的项目。或者你可以在任何你喜欢的环境中使用以下 CDN 链接来运行测试:`https://gitcdn.link/repo/freeCodeCamp/testable-projects-fcc/master/build/bundle.js`.
|
||||
|
||||
一旦你完成了本项目并且该项目所有测试运行通过,请提交项目的 URL。
|
||||
</section>
|
||||
|
||||
## Instructions
|
||||
<section id='instructions'>
|
||||
# --hints--
|
||||
|
||||
</section>
|
||||
|
||||
## Tests
|
||||
<section id='tests'>
|
||||
# --solutions--
|
||||
|
||||
```yml
|
||||
tests: []
|
||||
|
||||
```
|
||||
|
||||
</section>
|
||||
|
||||
## Challenge Seed
|
||||
<section id='challengeSeed'>
|
||||
|
||||
</section>
|
||||
|
||||
## Solution
|
||||
<section id='solution'>
|
||||
|
||||
```js
|
||||
// solution required
|
||||
```
|
||||
|
||||
</section>
|
||||
|
@ -1,62 +1,60 @@
|
||||
---
|
||||
id: bd7188d8c242eddfaeb5bd13
|
||||
title: 用热图可视化数据
|
||||
challengeType: 3
|
||||
forumTopicId: 301466
|
||||
title: 用热图可视化数据
|
||||
---
|
||||
|
||||
## Description
|
||||
<section id='description'>
|
||||
<strong>目标:</strong>在 <a href='https://codepen.io' target='_blank'>CodePen.io</a> 上实现一个功能类似 <a href='https://codepen.io/freeCodeCamp/full/JEXgeY' target='_blank'>https://codepen.io/freeCodeCamp/full/JEXgeY</a> 的 App。
|
||||
在满足以下<a href='https://en.wikipedia.org/wiki/User_story' target='_blank'>需求</a>并能通过所有测试的前提下,你可以根据自己的喜好来美化你的 app。
|
||||
你可以使用 HTML、JavaScript、CSS、以及基于 svg 的 D3 可视化库来完成这个挑战。该任务需要使用 D3 的坐标轴属性生成坐标轴,这个属性会自动生成沿轴的刻度。这些刻度是通过 D3 测试所必需的,因为它们的位置是用来确定图表元素的对齐方式。你可以在这里 <a href='https://github.com/d3/d3/blob/master/API.md#axes-d3-axis' target='_blank'>https://github.com/d3/d3/blob/master/API.md#axes-d3-axis</a> 获取关于生成坐标轴的信息。每次测试查询的元素都必须是非虚拟 DOM。 如果你使用了前端框架(例如 Vue),那么对于动态的内容测试结果可能不准确。我们希望最终能够兼容这些框架,但 D3 项目目前还不支持它们。
|
||||
<strong>需求 #1:</strong>我的热度图应该有一个具有<code>id="title"</code>属性的标题。
|
||||
<strong>需求 #2:</strong>我的热度图应该有一个具有<code>id="title"</code>属性的描述内容。
|
||||
<strong>需求 #3:</strong>我的热度图应该有一个具有<code>id="x-axis"</code>属性的 x 轴。
|
||||
<strong>需求 #4:</strong>我的热度图应该有一个具有<code>id="y-axis"</code>属性的 y 轴。
|
||||
<strong>需求 #5:</strong>我的热度图应该有一些<code>rect</code>元素来展示数据,他们具有<code>class="cell"</code>属性。
|
||||
<strong>需求 #6:</strong>这些单元格元素至少应该有 4 种不同的填充颜色。
|
||||
<strong>需求 #7:</strong>每个单元格元素都有这些属性<code>data-month</code>,<code>data-year</code>,<code>data-temp</code>,包含了它们相应的月份,年份和温度值。
|
||||
<strong>需求 #8:</strong>每个元素的<code>data-month</code>,<code>data-year</code>属性应该在数据范围内。
|
||||
<strong>需求 #9:</strong>我的热度图应该具有与 y 轴上的相应月份对齐的单元格。
|
||||
<strong>需求 #10:</strong>我的热度图应该具有与 x 轴上相应年份对齐的单元格。
|
||||
<strong>需求 #11:</strong>我的热度图应该在 y 轴上有多个刻度标签,并带有完整的月份名称。
|
||||
<strong>需求 #12:</strong>我的热度图应该在 x 轴上有多个刻度标签,年份在 1754 到 2015 之间。
|
||||
<strong>需求 #13:</strong>我的热度图应该有一个具有<code>id="legend"</code>属性的图例。
|
||||
<strong>需求 #14:</strong>我的图例应该包含一些<code>rect</code>元素。
|
||||
<strong>需求 #15:</strong>图例中的这些<code>rect</code>元素应该至少使用 4 种不同的填充颜色。
|
||||
<strong>需求 #16:</strong>我可以将鼠标悬停在某个区域上,并查看具有<code>id="tooltip"</code>属性的提示框,它会显示有关该区域的更多信息。
|
||||
<strong>需求 #17:</strong>我的提示框应该有一个<code>data-year</code>属性,它对应了当前激活区域的<code>data-year</code>属性。
|
||||
以下是完成此项目所需的数据:<code>https://raw.githubusercontent.com/freeCodeCamp/ProjectReferenceData/master/global-temperature.json</code>
|
||||
你可以 fork <a href='https://codepen.io/freeCodeCamp/pen/MJjpwO' target='_blank'>这个 CodePen pen 项目</a>来构建你的项目。或者你可以在任何你喜欢的环境中使用以下 CDN 链接来运行测试:<code>https://gitcdn.link/repo/freeCodeCamp/testable-projects-fcc/master/build/bundle.js</code>.
|
||||
# --description--
|
||||
|
||||
**目标:** 在 [CodePen.io](https://codepen.io) 上实现一个功能类似 <https://codepen.io/freeCodeCamp/full/JEXgeY> 的 App。
|
||||
|
||||
在满足以下[需求](https://en.wikipedia.org/wiki/User_story)并能通过所有测试的前提下,你可以根据自己的喜好来美化你的 app。
|
||||
|
||||
你可以使用 HTML、JavaScript、CSS、以及基于 svg 的 D3 可视化库来完成这个挑战。该任务需要使用 D3 的坐标轴属性生成坐标轴,这个属性会自动生成沿轴的刻度。这些刻度是通过 D3 测试所必需的,因为它们的位置是用来确定图表元素的对齐方式。你可以在这里 <https://github.com/d3/d3/blob/master/API.md#axes-d3-axis> 获取关于生成坐标轴的信息。每次测试查询的元素都必须是非虚拟 DOM。 如果你使用了前端框架(例如 Vue),那么对于动态的内容测试结果可能不准确。我们希望最终能够兼容这些框架,但 D3 项目目前还不支持它们。
|
||||
|
||||
**需求 #1:** 我的热度图应该有一个具有`id="title"`属性的标题。
|
||||
|
||||
**需求 #2:** 我的热度图应该有一个具有`id="title"`属性的描述内容。
|
||||
|
||||
**需求 #3:** 我的热度图应该有一个具有`id="x-axis"`属性的 x 轴。
|
||||
|
||||
**需求 #4:** 我的热度图应该有一个具有`id="y-axis"`属性的 y 轴。
|
||||
|
||||
**需求 #5:** 我的热度图应该有一些`rect`元素来展示数据,他们具有`class="cell"`属性。
|
||||
|
||||
**需求 #6:** 这些单元格元素至少应该有 4 种不同的填充颜色。
|
||||
|
||||
**需求 #7:** 每个单元格元素都有这些属性`data-month`,`data-year`,`data-temp`,包含了它们相应的月份,年份和温度值。
|
||||
|
||||
**需求 #8:** 每个元素的`data-month`,`data-year`属性应该在数据范围内。
|
||||
|
||||
**需求 #9:** 我的热度图应该具有与 y 轴上的相应月份对齐的单元格。
|
||||
|
||||
**需求 #10:** 我的热度图应该具有与 x 轴上相应年份对齐的单元格。
|
||||
|
||||
**需求 #11:** 我的热度图应该在 y 轴上有多个刻度标签,并带有完整的月份名称。
|
||||
|
||||
**需求 #12:** 我的热度图应该在 x 轴上有多个刻度标签,年份在 1754 到 2015 之间。
|
||||
|
||||
**需求 #13:** 我的热度图应该有一个具有`id="legend"`属性的图例。
|
||||
|
||||
**需求 #14:** 我的图例应该包含一些`rect`元素。
|
||||
|
||||
**需求 #15:** 图例中的这些`rect`元素应该至少使用 4 种不同的填充颜色。
|
||||
|
||||
**需求 #16:** 我可以将鼠标悬停在某个区域上,并查看具有`id="tooltip"`属性的提示框,它会显示有关该区域的更多信息。
|
||||
|
||||
**需求 #17:** 我的提示框应该有一个`data-year`属性,它对应了当前激活区域的`data-year`属性。
|
||||
|
||||
以下是完成此项目所需的数据:`https://raw.githubusercontent.com/freeCodeCamp/ProjectReferenceData/master/global-temperature.json`
|
||||
|
||||
你可以 fork [这个 CodePen pen 项目](https://codepen.io/freeCodeCamp/pen/MJjpwO)来构建你的项目。或者你可以在任何你喜欢的环境中使用以下 CDN 链接来运行测试:`https://gitcdn.link/repo/freeCodeCamp/testable-projects-fcc/master/build/bundle.js`.
|
||||
|
||||
一旦你完成了本项目并且该项目所有测试运行通过,请提交项目的 URL。
|
||||
</section>
|
||||
|
||||
## Instructions
|
||||
<section id='instructions'>
|
||||
# --hints--
|
||||
|
||||
</section>
|
||||
|
||||
## Tests
|
||||
<section id='tests'>
|
||||
# --solutions--
|
||||
|
||||
```yml
|
||||
tests: []
|
||||
|
||||
```
|
||||
|
||||
</section>
|
||||
|
||||
## Challenge Seed
|
||||
<section id='challengeSeed'>
|
||||
|
||||
</section>
|
||||
|
||||
## Solution
|
||||
<section id='solution'>
|
||||
|
||||
```js
|
||||
// solution required
|
||||
```
|
||||
|
||||
</section>
|
||||
|
@ -1,60 +1,56 @@
|
||||
---
|
||||
id: bd7178d8c242eddfaeb5bd13
|
||||
title: 用散点图可视化数据
|
||||
challengeType: 3
|
||||
forumTopicId: 301467
|
||||
title: 用散点图可视化数据
|
||||
---
|
||||
|
||||
## Description
|
||||
<section id='description'>
|
||||
<strong>目标:</strong>在 <a href='https://codepen.io' target='_blank'>CodePen.io</a> 上实现一个功能类似 <a href='https://codepen.io/freeCodeCamp/full/bgpXyK' target='_blank'>https://codepen.io/freeCodeCamp/full/bgpXyK</a> 的 App。
|
||||
在满足以下<a href='https://en.wikipedia.org/wiki/User_story' target='_blank'>需求</a>并能通过所有测试的前提下,你可以根据自己的喜好来美化你的 app。
|
||||
你可以使用 HTML、JavaScript、CSS、以及基于 svg 的 D3 可视化库来完成这个挑战。该任务需要使用 D3 的坐标轴属性生成坐标轴,这个属性会自动生成沿轴的刻度。这些刻度是通过 D3 测试所必需的,因为它们的位置是用来确定图表元素的对齐方式。你可以在这里 <a href='https://github.com/d3/d3/blob/master/API.md#axes-d3-axis' target='_blank'>https://github.com/d3/d3/blob/master/API.md#axes-d3-axis</a> 获取关于生成坐标轴的信息。每次测试查询的元素都必须是非虚拟 DOM。 如果你使用了前端框架(例如 Vue),那么对于动态的内容测试结果可能不准确。我们希望最终能够兼容这些框架,但 D3 项目目前还不支持它们。
|
||||
<strong>需求 #1:</strong>我能看到一个具有<code>id="title"</code>属性的标题元素。
|
||||
<strong>需求 #2:</strong>我能看到一个具有<code>id="x-axis"</code>属性的 x 轴。
|
||||
<strong>需求 #3:</strong>我能看到一个具有<code>id="y-axis"</code>属性的 y 轴。
|
||||
<strong>需求 #4:</strong>我可以看到一些点,每个点都有一个值为<code>dot</code>的 class 属性,它代表了被绘制的数据。
|
||||
<strong>需求 #5:</strong>每个点都应具有<code>data-xvalue</code>属性和<code>data-yvalue</code>属性,其中包含相应的 x 和 y 值。
|
||||
<strong>需求 #6:</strong>每个点的<code>data-xvalue</code>属性和<code>data-yvalue</code>属性应该在实际数据的范围内,并且数据格式应该正确无误。对于<code>data-xvalue</code>属性,可以接受整数(全年)或 Date 对象进行测试评估。对于<code>data-yvalue</code>属性(分钟),请使用 Date 对象。
|
||||
<strong>需求 #7:</strong><code>data-xvalue</code>属性和它对应的点应该和 x 轴上的点或值对齐。
|
||||
<strong>需求 #8:</strong><code>data-yvalue</code>属性和它对应的点应该和 y 轴上的点或值对齐。
|
||||
<strong>需求 #9:</strong>我可以在 y 轴上看到多个时间格式为<code>%M:%S</code>的刻度标签。
|
||||
<strong>需求 #10:</strong>我可以在 x 轴上看到显示年份的多个刻度标签。
|
||||
<strong>需求 #11:</strong>我可以看到 x 轴标签的范围在实际 x 轴数据的范围内。
|
||||
<strong>需求 #12:</strong>我可以看到 y 轴标签的范围在实际 y 轴数据的范围内。
|
||||
<strong>需求 #13:</strong>我可以看到一个包含描述性文字的图例,它具有<code>id="legend"</code>属性。
|
||||
<strong>需求 #14:</strong>我可以将鼠标悬停在某个区域上,并查看具有<code>id="tooltip"</code>属性的提示框,它会显示有关该区域的更多信息。
|
||||
<strong>需求 #15:</strong>我的提示框应该有一个<code>data-year</code>属性,它对应了当前激活区域的<code>data-xvalue</code>属性。
|
||||
以下是完成此项目所需的数据:<code>https://raw.githubusercontent.com/freeCodeCamp/ProjectReferenceData/master/cyclist-data.json</code>
|
||||
你可以 fork <a href='https://codepen.io/freeCodeCamp/pen/MJjpwO' target='_blank'>这个 CodePen pen 项目</a>来构建你的项目。或者你可以在任何你喜欢的环境中使用以下 CDN 链接来运行测试:<code>https://gitcdn.link/repo/freeCodeCamp/testable-projects-fcc/master/build/bundle.js</code>.
|
||||
# --description--
|
||||
|
||||
**目标:** 在 [CodePen.io](https://codepen.io) 上实现一个功能类似 <https://codepen.io/freeCodeCamp/full/bgpXyK> 的 App。
|
||||
|
||||
在满足以下[需求](https://en.wikipedia.org/wiki/User_story)并能通过所有测试的前提下,你可以根据自己的喜好来美化你的 app。
|
||||
|
||||
你可以使用 HTML、JavaScript、CSS、以及基于 svg 的 D3 可视化库来完成这个挑战。该任务需要使用 D3 的坐标轴属性生成坐标轴,这个属性会自动生成沿轴的刻度。这些刻度是通过 D3 测试所必需的,因为它们的位置是用来确定图表元素的对齐方式。你可以在这里 <https://github.com/d3/d3/blob/master/API.md#axes-d3-axis> 获取关于生成坐标轴的信息。每次测试查询的元素都必须是非虚拟 DOM。 如果你使用了前端框架(例如 Vue),那么对于动态的内容测试结果可能不准确。我们希望最终能够兼容这些框架,但 D3 项目目前还不支持它们。
|
||||
|
||||
**需求 #1:** 我能看到一个具有`id="title"`属性的标题元素。
|
||||
|
||||
**需求 #2:** 我能看到一个具有`id="x-axis"`属性的 x 轴。
|
||||
|
||||
**需求 #3:** 我能看到一个具有`id="y-axis"`属性的 y 轴。
|
||||
|
||||
**需求 #4:** 我可以看到一些点,每个点都有一个值为`dot`的 class 属性,它代表了被绘制的数据。
|
||||
|
||||
**需求 #5:** 每个点都应具有`data-xvalue`属性和`data-yvalue`属性,其中包含相应的 x 和 y 值。
|
||||
|
||||
**需求 #6:** 每个点的`data-xvalue`属性和`data-yvalue`属性应该在实际数据的范围内,并且数据格式应该正确无误。对于`data-xvalue`属性,可以接受整数(全年)或 Date 对象进行测试评估。对于`data-yvalue`属性(分钟),请使用 Date 对象。
|
||||
|
||||
**需求 #7:** `data-xvalue`属性和它对应的点应该和 x 轴上的点或值对齐。
|
||||
|
||||
**需求 #8:** `data-yvalue`属性和它对应的点应该和 y 轴上的点或值对齐。
|
||||
|
||||
**需求 #9:** 我可以在 y 轴上看到多个时间格式为`%M:%S`的刻度标签。
|
||||
|
||||
**需求 #10:** 我可以在 x 轴上看到显示年份的多个刻度标签。
|
||||
|
||||
**需求 #11:** 我可以看到 x 轴标签的范围在实际 x 轴数据的范围内。
|
||||
|
||||
**需求 #12:** 我可以看到 y 轴标签的范围在实际 y 轴数据的范围内。
|
||||
|
||||
**需求 #13:** 我可以看到一个包含描述性文字的图例,它具有`id="legend"`属性。
|
||||
|
||||
**需求 #14:** 我可以将鼠标悬停在某个区域上,并查看具有`id="tooltip"`属性的提示框,它会显示有关该区域的更多信息。
|
||||
|
||||
**需求 #15:** 我的提示框应该有一个`data-year`属性,它对应了当前激活区域的`data-xvalue`属性。
|
||||
|
||||
以下是完成此项目所需的数据:`https://raw.githubusercontent.com/freeCodeCamp/ProjectReferenceData/master/cyclist-data.json`
|
||||
|
||||
你可以 fork [这个 CodePen pen 项目](https://codepen.io/freeCodeCamp/pen/MJjpwO)来构建你的项目。或者你可以在任何你喜欢的环境中使用以下 CDN 链接来运行测试:`https://gitcdn.link/repo/freeCodeCamp/testable-projects-fcc/master/build/bundle.js`.
|
||||
|
||||
一旦你完成了本项目并且该项目所有测试运行通过,请提交项目的 URL。
|
||||
</section>
|
||||
|
||||
## Instructions
|
||||
<section id='instructions'>
|
||||
# --hints--
|
||||
|
||||
</section>
|
||||
|
||||
## Tests
|
||||
<section id='tests'>
|
||||
# --solutions--
|
||||
|
||||
```yml
|
||||
tests: []
|
||||
|
||||
```
|
||||
|
||||
</section>
|
||||
|
||||
## Challenge Seed
|
||||
<section id='challengeSeed'>
|
||||
|
||||
</section>
|
||||
|
||||
## Solution
|
||||
<section id='solution'>
|
||||
|
||||
```js
|
||||
// solution required
|
||||
```
|
||||
|
||||
</section>
|
||||
|
@ -1,56 +1,52 @@
|
||||
---
|
||||
id: 587d7fa6367417b2b2512bc0
|
||||
title: 用树形图可视化数据
|
||||
challengeType: 3
|
||||
forumTopicId: 301468
|
||||
title: 用树形图可视化数据
|
||||
---
|
||||
|
||||
## Description
|
||||
<section id='description'>
|
||||
<strong>目标:</strong>在 <a href='https://codepen.io' target='_blank'>CodePen.io</a> 上实现一个功能类似 <a href='https://codepen.io/freeCodeCamp/full/KaNGNR' target='_blank'>https://codepen.io/freeCodeCamp/full/KaNGNR</a> 的 App。
|
||||
在满足以下<a href='https://en.wikipedia.org/wiki/User_story' target='_blank'>需求</a>并能通过所有测试的前提下,你可以根据自己的喜好来美化你的 app。
|
||||
你可以使用 HTML、JavaScript、CSS、以及基于 svg 的 D3 可视化库来完成这个挑战。该任务需要使用 D3 的坐标轴属性生成坐标轴,这个属性会自动生成沿轴的刻度。这些刻度是通过 D3 测试所必需的,因为它们的位置是用来确定图表元素的对齐方式。你可以在这里 <a href='https://github.com/d3/d3/blob/master/API.md#axes-d3-axis' target='_blank'>https://github.com/d3/d3/blob/master/API.md#axes-d3-axis</a> 获取关于生成坐标轴的信息。每次测试查询的元素都必须是非虚拟 DOM。 如果你使用了前端框架(例如 Vue),那么对于动态的内容测试结果可能不准确。我们希望最终能够兼容这些框架,但 D3 项目目前还不支持它们。
|
||||
<strong>需求 #1:</strong>我的矩阵树图应该有一个具有<code>id="title"</code>属性的标题。
|
||||
<strong>需求 #2:</strong>我的矩阵树图应该有一个具有<code>id="description"</code>属性的描述内容。
|
||||
<strong>需求 #3:</strong>我的矩阵树图应该有一些具有<code>class="tile"</code>属性的<code>rect</code>元素来展示数据。
|
||||
<strong>需求 #4:</strong>这些矩形块元素至少应该有 2 种不同的填充颜色。
|
||||
<strong>需求 #5:</strong>每一块矩形元素应该具有<code>data-name</code>,<code>data-category</code>,以及<code>data-value</code>这些属性,包含了它们相应的名称,分类,以及数值。
|
||||
<strong>需求 #6:</strong>每个矩形块的面积和它的 data-value 属性值相对应:data-value 值越大的矩形块面积越大。
|
||||
<strong>需求 #7:</strong>我的矩阵树图应该有一个具有<code>id="legend"</code>属性的图例。
|
||||
<strong>需求 #8:</strong>我的图例应该有一些具有<code>class="legend-item"</code>属性的<code>rect</code>元素。
|
||||
<strong>需求 #9:</strong>图例中的这些<code>rect</code>元素至少应该使用 2 种不同的填充颜色。
|
||||
<strong>需求 #10:</strong>我可以将鼠标悬停在某个区域上,并查看具有<code>id="tooltip"</code>属性的提示框,它会显示有关该区域的更多信息。
|
||||
<strong>需求 #11:</strong>我的提示框应该有一个<code>data-value</code>属性,它对应了当前激活区域的code>data-value</code>属性。
|
||||
对于此项目,您可以使用以下任何数据集:<br><ul><li><strong>Kickstarter Pledges:</strong> <code>https://cdn.rawgit.com/freeCodeCamp/testable-projects-fcc/a80ce8f9/src/data/tree_map/kickstarter-funding-data.json</code></li><li><strong>Movie Sales:</strong> <code>https://cdn.rawgit.com/freeCodeCamp/testable-projects-fcc/a80ce8f9/src/data/tree_map/movie-data.json</code></li><li><strong>Video Game Sales:</strong> <code>https://cdn.rawgit.com/freeCodeCamp/testable-projects-fcc/a80ce8f9/src/data/tree_map/video-game-sales-data.json</code></li></ul>
|
||||
你可以 fork <a href='https://codepen.io/freeCodeCamp/pen/MJjpwO' target='_blank'>这个 CodePen pen 项目</a>来构建你的项目。或者你可以在任何你喜欢的环境中使用以下 CDN 链接来运行测试:<code>https://gitcdn.link/repo/freeCodeCamp/testable-projects-fcc/master/build/bundle.js</code>.
|
||||
# --description--
|
||||
|
||||
**目标:** 在 [CodePen.io](https://codepen.io) 上实现一个功能类似 <https://codepen.io/freeCodeCamp/full/KaNGNR> 的 App。
|
||||
|
||||
在满足以下[需求](https://en.wikipedia.org/wiki/User_story)并能通过所有测试的前提下,你可以根据自己的喜好来美化你的 app。
|
||||
|
||||
你可以使用 HTML、JavaScript、CSS、以及基于 svg 的 D3 可视化库来完成这个挑战。该任务需要使用 D3 的坐标轴属性生成坐标轴,这个属性会自动生成沿轴的刻度。这些刻度是通过 D3 测试所必需的,因为它们的位置是用来确定图表元素的对齐方式。你可以在这里 <https://github.com/d3/d3/blob/master/API.md#axes-d3-axis> 获取关于生成坐标轴的信息。每次测试查询的元素都必须是非虚拟 DOM。 如果你使用了前端框架(例如 Vue),那么对于动态的内容测试结果可能不准确。我们希望最终能够兼容这些框架,但 D3 项目目前还不支持它们。
|
||||
|
||||
**需求 #1:** 我的矩阵树图应该有一个具有`id="title"`属性的标题。
|
||||
|
||||
**需求 #2:** 我的矩阵树图应该有一个具有`id="description"`属性的描述内容。
|
||||
|
||||
**需求 #3:** 我的矩阵树图应该有一些具有`class="tile"`属性的`rect`元素来展示数据。
|
||||
|
||||
**需求 #4:** 这些矩形块元素至少应该有 2 种不同的填充颜色。
|
||||
|
||||
**需求 #5:** 每一块矩形元素应该具有`data-name`,`data-category`,以及`data-value`这些属性,包含了它们相应的名称,分类,以及数值。
|
||||
|
||||
**需求 #6:** 每个矩形块的面积和它的 data-value 属性值相对应:data-value 值越大的矩形块面积越大。
|
||||
|
||||
**需求 #7:** 我的矩阵树图应该有一个具有`id="legend"`属性的图例。
|
||||
|
||||
**需求 #8:** 我的图例应该有一些具有`class="legend-item"`属性的`rect`元素。
|
||||
|
||||
**需求 #9:** 图例中的这些`rect`元素至少应该使用 2 种不同的填充颜色。
|
||||
|
||||
**需求 #10:** 我可以将鼠标悬停在某个区域上,并查看具有`id="tooltip"`属性的提示框,它会显示有关该区域的更多信息。
|
||||
|
||||
**需求 #11:** 我的提示框应该有一个`data-value`属性,它对应了当前激活区域的code>data-value属性。
|
||||
|
||||
对于此项目,您可以使用以下任何数据集:
|
||||
|
||||
- **Kickstarter Pledges:** `https://cdn.rawgit.com/freeCodeCamp/testable-projects-fcc/a80ce8f9/src/data/tree_map/kickstarter-funding-data.json`
|
||||
- **Movie Sales:** `https://cdn.rawgit.com/freeCodeCamp/testable-projects-fcc/a80ce8f9/src/data/tree_map/movie-data.json`
|
||||
- **Video Game Sales:** `https://cdn.rawgit.com/freeCodeCamp/testable-projects-fcc/a80ce8f9/src/data/tree_map/video-game-sales-data.json`
|
||||
|
||||
你可以 fork [这个 CodePen pen 项目](https://codepen.io/freeCodeCamp/pen/MJjpwO)来构建你的项目。或者你可以在任何你喜欢的环境中使用以下 CDN 链接来运行测试:`https://gitcdn.link/repo/freeCodeCamp/testable-projects-fcc/master/build/bundle.js`.
|
||||
|
||||
一旦你完成了本项目并且该项目所有测试运行通过,请提交项目的 URL。
|
||||
</section>
|
||||
|
||||
## Instructions
|
||||
<section id='instructions'>
|
||||
# --hints--
|
||||
|
||||
</section>
|
||||
|
||||
## Tests
|
||||
<section id='tests'>
|
||||
# --solutions--
|
||||
|
||||
```yml
|
||||
tests: []
|
||||
|
||||
```
|
||||
|
||||
</section>
|
||||
|
||||
## Challenge Seed
|
||||
<section id='challengeSeed'>
|
||||
|
||||
</section>
|
||||
|
||||
## Solution
|
||||
<section id='solution'>
|
||||
|
||||
```js
|
||||
// solution required
|
||||
```
|
||||
|
||||
</section>
|
||||
|
Reference in New Issue
Block a user