{
    "componentChunkName": "component---src-templates-challenges-projects-frontend-show-tsx",
    "path": "/learn/data-visualization/data-visualization-projects/visualize-data-with-a-bar-chart",
    "result": {"data":{"challengeNode":{"challenge":{"forumTopicId":301464,"title":"Visualize Data with a Bar Chart","description":"<section id=\"description\">\n<p><strong>Objective:</strong> Build a CodePen app.</p>\n<p>Fulfill the below user stories and get all of the tests to pass. Give it your own personal style.</p>\n<p>You can use HTML, JavaScript, CSS, and the D3 svg-based visualization library. The tests require axes to be generated using the D3 axis property, which automatically generates ticks along the axis. These ticks are required for passing the D3 tests because their positions are used to determine alignment of graphed elements. Required (non-virtual) DOM elements are queried on the moment of each test. If you use a frontend framework (like Vue for example), the test results may be inaccurate for dynamic content. We hope to accommodate them eventually, but these frameworks are not currently supported for D3 projects.</p>\n<p><strong>User Story #1:</strong> My chart should have a title with a corresponding <code>id=\"title\"</code>.</p>\n<p><strong>User Story #2:</strong> My chart should have a <code>g</code> element x-axis with a corresponding <code>id=\"x-axis\"</code>.</p>\n<p><strong>User Story #3:</strong> My chart should have a <code>g</code> element y-axis with a corresponding <code>id=\"y-axis\"</code>.</p>\n<p><strong>User Story #4:</strong> Both axes should contain multiple tick labels, each with a corresponding <code>class=\"tick\"</code>.</p>\n<p><strong>User Story #5:</strong> My chart should have a <code>rect</code> element for each data point with a corresponding <code>class=\"bar\"</code> displaying the data.</p>\n<p><strong>User Story #6:</strong> Each bar should have the properties <code>data-date</code> and <code>data-gdp</code> containing <code>date</code> and <code>GDP</code> values.</p>\n<p><strong>User Story #7:</strong> The bar elements' <code>data-date</code> properties should match the order of the provided data.</p>\n<p><strong>User Story #8:</strong> The bar elements' <code>data-gdp</code> properties should match the order of the provided data.</p>\n<p><strong>User Story #9:</strong> Each bar element's height should accurately represent the data's corresponding <code>GDP</code>.</p>\n<p><strong>User Story #10:</strong> The <code>data-date</code> attribute and its corresponding bar element should align with the corresponding value on the x-axis.</p>\n<p><strong>User Story #11:</strong> The <code>data-gdp</code> attribute and its corresponding bar element should align with the corresponding value on the y-axis.</p>\n<p><strong>User Story #12:</strong> I can mouse over an area and see a tooltip with a corresponding <code>id=\"tooltip\"</code> which displays more information about the area.</p>\n<p><strong>User Story #13:</strong> My tooltip should have a <code>data-date</code> property that corresponds to the <code>data-date</code> of the active area.</p>\n<p>.</p>\n<p>Once you're done, submit the URL to your working project with all its tests passing.</p>\n</section>","instructions":null,"challengeType":3,"helpCategory":"JavaScript","superBlock":"data-visualization","certification":"data-visualization","block":"data-visualization-projects","translationPending":false,"fields":{"blockName":"Data Visualization Projects","slug":"/learn/data-visualization/data-visualization-projects/visualize-data-with-a-bar-chart"}}}},"pageContext":{"challengeMeta":{"certification":"data-visualization","superBlock":"data-visualization","block":"data-visualization-projects","template":"","required":[],"nextChallengePath":"/learn/data-visualization/data-visualization-projects/visualize-data-with-a-scatterplot-graph","prevChallengePath":"/learn/data-visualization/json-apis-and-ajax/post-data-with-the-javascript-xmlhttprequest-method","id":"bd7168d8c242eddfaeb5bd13"},"projectPreview":{"showProjectPreview":false,"challengeData":{"challengeType":3,"challengeFiles":[]}},"slug":"/learn/data-visualization/data-visualization-projects/visualize-data-with-a-bar-chart"}},
    "staticQueryHashes": ["3216307819","3851966407"]}