on part 3 of hw3
This commit is contained in:
12
hw3/.idea/hw3.iml
generated
Normal file
12
hw3/.idea/hw3.iml
generated
Normal file
@@ -0,0 +1,12 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<module type="WEB_MODULE" version="4">
|
||||
<component name="NewModuleRootManager">
|
||||
<content url="file://$MODULE_DIR$">
|
||||
<excludeFolder url="file://$MODULE_DIR$/.tmp" />
|
||||
<excludeFolder url="file://$MODULE_DIR$/temp" />
|
||||
<excludeFolder url="file://$MODULE_DIR$/tmp" />
|
||||
</content>
|
||||
<orderEntry type="inheritedJdk" />
|
||||
<orderEntry type="sourceFolder" forTests="false" />
|
||||
</component>
|
||||
</module>
|
||||
6
hw3/.idea/misc.xml
generated
Normal file
6
hw3/.idea/misc.xml
generated
Normal file
@@ -0,0 +1,6 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<project version="4">
|
||||
<component name="JavaScriptSettings">
|
||||
<option name="languageLevel" value="ES6" />
|
||||
</component>
|
||||
</project>
|
||||
8
hw3/.idea/modules.xml
generated
Normal file
8
hw3/.idea/modules.xml
generated
Normal file
@@ -0,0 +1,8 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<project version="4">
|
||||
<component name="ProjectModuleManager">
|
||||
<modules>
|
||||
<module fileurl="file://$PROJECT_DIR$/.idea/hw3.iml" filepath="$PROJECT_DIR$/.idea/hw3.iml" />
|
||||
</modules>
|
||||
</component>
|
||||
</project>
|
||||
6
hw3/.idea/vcs.xml
generated
Normal file
6
hw3/.idea/vcs.xml
generated
Normal file
@@ -0,0 +1,6 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<project version="4">
|
||||
<component name="VcsDirectoryMappings">
|
||||
<mapping directory="$PROJECT_DIR$/.." vcs="Git" />
|
||||
</component>
|
||||
</project>
|
||||
242
hw3/.idea/workspace.xml
generated
Normal file
242
hw3/.idea/workspace.xml
generated
Normal file
@@ -0,0 +1,242 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<project version="4">
|
||||
<component name="ChangeListManager">
|
||||
<list default="true" id="d913f462-7721-4324-b281-53f1a4bb289e" name="Default Changelist" comment="">
|
||||
<change beforePath="$PROJECT_DIR$/../hw2/.idea/workspace.xml" beforeDir="false" afterPath="$PROJECT_DIR$/../hw2/.idea/workspace.xml" afterDir="false" />
|
||||
<change beforePath="$PROJECT_DIR$/hw3.html" beforeDir="false" afterPath="$PROJECT_DIR$/hw3.html" afterDir="false" />
|
||||
<change beforePath="$PROJECT_DIR$/script.js" beforeDir="false" afterPath="$PROJECT_DIR$/script.js" afterDir="false" />
|
||||
</list>
|
||||
<ignored path="$PROJECT_DIR$/.tmp/" />
|
||||
<ignored path="$PROJECT_DIR$/temp/" />
|
||||
<ignored path="$PROJECT_DIR$/tmp/" />
|
||||
<option name="EXCLUDED_CONVERTED_TO_IGNORED" value="true" />
|
||||
<option name="SHOW_DIALOG" value="false" />
|
||||
<option name="HIGHLIGHT_CONFLICTS" value="true" />
|
||||
<option name="HIGHLIGHT_NON_ACTIVE_CHANGELIST" value="false" />
|
||||
<option name="LAST_RESOLUTION" value="IGNORE" />
|
||||
</component>
|
||||
<component name="FUSProjectUsageTrigger">
|
||||
<session id="-568225377">
|
||||
<usages-collector id="statistics.lifecycle.project">
|
||||
<counts>
|
||||
<entry key="project.closed" value="1" />
|
||||
<entry key="project.open.time.1" value="1" />
|
||||
<entry key="project.open.time.6" value="1" />
|
||||
<entry key="project.opened" value="2" />
|
||||
</counts>
|
||||
</usages-collector>
|
||||
<usages-collector id="statistics.file.extensions.edit">
|
||||
<counts>
|
||||
<entry key="html" value="132" />
|
||||
<entry key="js" value="1325" />
|
||||
</counts>
|
||||
</usages-collector>
|
||||
<usages-collector id="statistics.file.types.edit">
|
||||
<counts>
|
||||
<entry key="HTML" value="132" />
|
||||
<entry key="JavaScript" value="1325" />
|
||||
</counts>
|
||||
</usages-collector>
|
||||
<usages-collector id="statistics.file.extensions.open">
|
||||
<counts>
|
||||
<entry key="js" value="1" />
|
||||
</counts>
|
||||
</usages-collector>
|
||||
<usages-collector id="statistics.file.types.open">
|
||||
<counts>
|
||||
<entry key="JavaScript" value="1" />
|
||||
</counts>
|
||||
</usages-collector>
|
||||
</session>
|
||||
</component>
|
||||
<component name="FileEditorManager">
|
||||
<leaf SIDE_TABS_SIZE_LIMIT_KEY="300">
|
||||
<file pinned="false" current-in-tab="false">
|
||||
<entry file="file://$PROJECT_DIR$/hw3.html">
|
||||
<provider selected="true" editor-type-id="text-editor">
|
||||
<state relative-caret-position="430">
|
||||
<caret line="95" column="12" lean-forward="true" selection-start-line="95" selection-start-column="12" selection-end-line="95" selection-end-column="12" />
|
||||
</state>
|
||||
</provider>
|
||||
</entry>
|
||||
</file>
|
||||
<file pinned="false" current-in-tab="true">
|
||||
<entry file="file://$PROJECT_DIR$/script.js">
|
||||
<provider selected="true" editor-type-id="text-editor">
|
||||
<state relative-caret-position="336">
|
||||
<caret line="37" column="77" selection-start-line="37" selection-start-column="77" selection-end-line="37" selection-end-column="77" />
|
||||
</state>
|
||||
</provider>
|
||||
</entry>
|
||||
</file>
|
||||
</leaf>
|
||||
</component>
|
||||
<component name="FindInProjectRecents">
|
||||
<findStrings>
|
||||
<find>chart1</find>
|
||||
</findStrings>
|
||||
</component>
|
||||
<component name="Git.Settings">
|
||||
<option name="RECENT_GIT_ROOT_PATH" value="$PROJECT_DIR$/.." />
|
||||
</component>
|
||||
<component name="GradleLocalSettings">
|
||||
<option name="externalProjectsViewState">
|
||||
<projects_view />
|
||||
</option>
|
||||
</component>
|
||||
<component name="IdeDocumentHistory">
|
||||
<option name="CHANGED_PATHS">
|
||||
<list>
|
||||
<option value="$PROJECT_DIR$/hw3.html" />
|
||||
<option value="$PROJECT_DIR$/script.js" />
|
||||
</list>
|
||||
</option>
|
||||
</component>
|
||||
<component name="JsBuildToolGruntFileManager" detection-done="true" sorting="DEFINITION_ORDER" />
|
||||
<component name="JsBuildToolPackageJson" detection-done="true" sorting="DEFINITION_ORDER" />
|
||||
<component name="JsGulpfileManager">
|
||||
<detection-done>true</detection-done>
|
||||
<sorting>DEFINITION_ORDER</sorting>
|
||||
</component>
|
||||
<component name="ProjectFrameBounds">
|
||||
<option name="y" value="23" />
|
||||
<option name="width" value="1280" />
|
||||
<option name="height" value="731" />
|
||||
</component>
|
||||
<component name="ProjectLevelVcsManager" settingsEditedManually="true" />
|
||||
<component name="ProjectView">
|
||||
<navigator proportions="" version="1">
|
||||
<foldersAlwaysOnTop value="true" />
|
||||
</navigator>
|
||||
<panes>
|
||||
<pane id="Scope" />
|
||||
<pane id="ProjectPane">
|
||||
<subPane>
|
||||
<expand>
|
||||
<path>
|
||||
<item name="hw3" type="b2602c69:ProjectViewProjectNode" />
|
||||
<item name="hw3" type="462c0819:PsiDirectoryNode" />
|
||||
</path>
|
||||
</expand>
|
||||
<select />
|
||||
</subPane>
|
||||
</pane>
|
||||
<pane id="AndroidView" />
|
||||
<pane id="PackagesPane" />
|
||||
</panes>
|
||||
</component>
|
||||
<component name="PropertiesComponent">
|
||||
<property name="WebServerToolWindowFactoryState" value="false" />
|
||||
<property name="javascript.karma.karma_node_package_dir" value="" />
|
||||
<property name="js.buildTools.grunt.grunt-cli.package" value="" />
|
||||
<property name="last_opened_file_path" value="$PROJECT_DIR$" />
|
||||
<property name="nodejs.cucumber.cucumber_node_package_dir" value="" />
|
||||
<property name="nodejs.jest.jest_package" value="" />
|
||||
<property name="nodejs.mocha.mocha_node_package_dir" value="" />
|
||||
<property name="nodejs.protractor.protractor_package" value="" />
|
||||
<property name="nodejs_interpreter_path.stuck_in_default_project" value="undefined stuck path" />
|
||||
<property name="nodejs_npm_path_reset_for_default_project" value="true" />
|
||||
<property name="aspect.path.notification.shown" value="true" />
|
||||
<property name="nodejs_interpreter_path" value="/usr/local/bin/node" />
|
||||
</component>
|
||||
<component name="RunDashboard">
|
||||
<option name="ruleStates">
|
||||
<list>
|
||||
<RuleState>
|
||||
<option name="name" value="ConfigurationTypeDashboardGroupingRule" />
|
||||
</RuleState>
|
||||
<RuleState>
|
||||
<option name="name" value="StatusDashboardGroupingRule" />
|
||||
</RuleState>
|
||||
</list>
|
||||
</option>
|
||||
</component>
|
||||
<component name="RunManager">
|
||||
<configuration default="true" type="ChromiumRemoteDebugType" factoryName="Chromium Remote" port="9001">
|
||||
<method v="2" />
|
||||
</configuration>
|
||||
<configuration name="Unnamed" type="NodeJSConfigurationType" factoryName="Node.js" path-to-js-file="script.js" working-dir="$PROJECT_DIR$">
|
||||
<method v="2" />
|
||||
</configuration>
|
||||
<configuration default="true" type="js.build_tools.grunt" factoryName="Grunt.js">
|
||||
<node-interpreter value="project" />
|
||||
<envs />
|
||||
<method v="2" />
|
||||
</configuration>
|
||||
</component>
|
||||
<component name="SvnConfiguration">
|
||||
<configuration />
|
||||
</component>
|
||||
<component name="TaskManager">
|
||||
<task active="true" id="Default" summary="Default task">
|
||||
<changelist id="d913f462-7721-4324-b281-53f1a4bb289e" name="Default Changelist" comment="" />
|
||||
<created>1569214123580</created>
|
||||
<option name="number" value="Default" />
|
||||
<option name="presentableId" value="Default" />
|
||||
<updated>1569214123580</updated>
|
||||
<workItem from="1569214124878" duration="389000" />
|
||||
<workItem from="1569214556532" duration="97000" />
|
||||
<workItem from="1569214674667" duration="5314000" />
|
||||
</task>
|
||||
<servers />
|
||||
</component>
|
||||
<component name="TimeTrackingManager">
|
||||
<option name="totallyTimeSpent" value="5800000" />
|
||||
</component>
|
||||
<component name="ToolWindowManager">
|
||||
<frame x="0" y="23" width="1280" height="731" extended-state="0" />
|
||||
<editor active="true" />
|
||||
<layout>
|
||||
<window_info active="true" content_ui="combo" id="Project" order="0" visible="true" weight="0.2494043" />
|
||||
<window_info id="Structure" order="1" weight="0.25" />
|
||||
<window_info id="Image Layers" order="2" />
|
||||
<window_info id="Designer" order="3" />
|
||||
<window_info id="UI Designer" order="4" />
|
||||
<window_info id="Capture Tool" order="5" />
|
||||
<window_info id="Favorites" order="6" side_tool="true" />
|
||||
<window_info anchor="bottom" id="Docker" show_stripe_button="false" />
|
||||
<window_info anchor="bottom" id="Message" order="0" />
|
||||
<window_info anchor="bottom" id="Find" order="1" />
|
||||
<window_info anchor="bottom" id="Run" order="2" />
|
||||
<window_info anchor="bottom" id="Debug" order="3" weight="0.4" />
|
||||
<window_info anchor="bottom" id="Cvs" order="4" weight="0.25" />
|
||||
<window_info anchor="bottom" id="Inspection" order="5" weight="0.4" />
|
||||
<window_info anchor="bottom" id="TODO" order="6" />
|
||||
<window_info anchor="bottom" id="Version Control" order="7" />
|
||||
<window_info anchor="bottom" id="Terminal" order="8" />
|
||||
<window_info anchor="bottom" id="Event Log" order="9" side_tool="true" />
|
||||
<window_info anchor="right" id="Commander" order="0" weight="0.4" />
|
||||
<window_info anchor="right" id="Ant Build" order="1" weight="0.25" />
|
||||
<window_info anchor="right" content_ui="combo" id="Hierarchy" order="2" weight="0.25" />
|
||||
<window_info anchor="right" id="Palette" order="3" />
|
||||
<window_info anchor="right" id="Capture Analysis" order="4" />
|
||||
<window_info anchor="right" id="Cargo" order="5" />
|
||||
<window_info anchor="right" id="Theme Preview" order="6" />
|
||||
<window_info anchor="right" id="Database" order="7" />
|
||||
<window_info anchor="right" id="Palette	" order="8" />
|
||||
<window_info anchor="right" id="Maven Projects" order="9" />
|
||||
</layout>
|
||||
</component>
|
||||
<component name="TypeScriptGeneratedFilesManager">
|
||||
<option name="version" value="1" />
|
||||
</component>
|
||||
<component name="VcsContentAnnotationSettings">
|
||||
<option name="myLimit" value="2678400000" />
|
||||
</component>
|
||||
<component name="editorHistoryManager">
|
||||
<entry file="file://$PROJECT_DIR$/hw3.html">
|
||||
<provider selected="true" editor-type-id="text-editor">
|
||||
<state relative-caret-position="430">
|
||||
<caret line="95" column="12" lean-forward="true" selection-start-line="95" selection-start-column="12" selection-end-line="95" selection-end-column="12" />
|
||||
</state>
|
||||
</provider>
|
||||
</entry>
|
||||
<entry file="file://$PROJECT_DIR$/script.js">
|
||||
<provider selected="true" editor-type-id="text-editor">
|
||||
<state relative-caret-position="336">
|
||||
<caret line="37" column="77" selection-start-line="37" selection-start-column="77" selection-end-line="37" selection-end-column="77" />
|
||||
</state>
|
||||
</provider>
|
||||
</entry>
|
||||
</component>
|
||||
</project>
|
||||
14
hw3/hw3.html
14
hw3/hw3.html
@@ -50,21 +50,21 @@
|
||||
|
||||
<h3>CS 5890 Homework 3</h3>
|
||||
<address>
|
||||
<span>Your Name</span>
|
||||
<span>Your Email Address</span>
|
||||
<span>Your A#</span>
|
||||
<span>Brady Bodily</span>
|
||||
<span>brady.bodily1@aggiemail.usu.edu</span>
|
||||
<span>A00987897</span>
|
||||
</address>
|
||||
<br>
|
||||
<hr>
|
||||
<br>
|
||||
|
||||
<span>
|
||||
<button>Staircase</button>
|
||||
<button onclick="staircase()">Staircase</button>
|
||||
</span>
|
||||
|
||||
<span>
|
||||
<label>Dataset:</label>
|
||||
<select id="dataset">
|
||||
<select id="dataset" onchange=changeData()>
|
||||
<option value="anscombe_I">Anscombe's Quartet I</option>
|
||||
<option selected value="anscombe_II">Anscombe's Quartet II</option>
|
||||
<option value="anscombe_III">Anscombe's Quartet III</option>
|
||||
@@ -73,7 +73,7 @@
|
||||
</span>
|
||||
|
||||
<span>
|
||||
<input type="checkbox" id="random"> Random Subset
|
||||
<input type="checkbox" id="random" onselect="randomSubset()"> Random Subset
|
||||
</span>
|
||||
|
||||
<br>
|
||||
@@ -96,7 +96,7 @@
|
||||
</g>
|
||||
</svg>
|
||||
|
||||
<svg width="200" height="200">
|
||||
<svg width="200" height="200" id="chart2">
|
||||
<g transform="translate(0, 200) scale(1, -1)" class="barChart" >
|
||||
<rect x="10" y="0" width="10" height="91"></rect>
|
||||
<rect x="20" y="0" width="10" height="81"></rect>
|
||||
|
||||
@@ -5,6 +5,11 @@
|
||||
*/
|
||||
function staircase() {
|
||||
// ****** TODO: PART II ******
|
||||
let bar = document.getElementById("chart1").children[0].children;
|
||||
for(let i = 0; i < bar.length; i++){
|
||||
bar[i].style.height = (i+1) * 10;
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
/**
|
||||
@@ -28,9 +33,18 @@ function update(data) {
|
||||
// ****** TODO: PART III (you will also edit in PART V) ******
|
||||
|
||||
// TODO: Select and update the 'a' bar chart bars
|
||||
let aBars = document.getElementById("chart1").children[0].children;
|
||||
for(let i = 0; i < aBars.length; i++){
|
||||
console.log(aScale(data[i].a));
|
||||
d3.select("chart1").select("barChart").selectAll('rect').attr('height', aScale(data[i].a));
|
||||
aBars[i].height = aScale(data[i].a);
|
||||
}
|
||||
|
||||
// TODO: Select and update the 'b' bar chart bars
|
||||
|
||||
let bBars = document.getElementById("chart2").children[0].children;
|
||||
for(let i = 0; i < bBars.length; i++){
|
||||
bBars[i].height = bScale(data[i].b);
|
||||
}
|
||||
// TODO: Select and update the 'a' line chart path using this line generator
|
||||
|
||||
let aLineGenerator = d3.line()
|
||||
|
||||
Reference in New Issue
Block a user