Jump to content

Cherry

Member
  • Posts

    6
  • Joined

  • Last visited

Awards

This user doesn't have any awards

About Cherry

  • Birthday Oct 31, 1992

Contact Methods

Profile Information

  • Gender
    Male
  • Location
    Kent, United Kingdom
  • Occupation
    Self-employed

System

  • CPU
    AMD Ryzen 7 3700X
  • Motherboard
    Asus ROG STRIX X570-F GAMING
  • RAM
    2x16G Corsair Vengeance RGB PRO DDR4 3200
  • GPU
    EVGA RTX 2070 SUPER BLACK
  • Case
    NZXT H710
  • Storage
    2 x Samsung 1TB 970 EVO PLUS (boot) + 960GB Sandisk Ultra II (games) + 1TB Samsung 1TB 850 EVO (storage)
  • PSU
    Corsair RM650X
  • Cooling
    be quiet! Dark Rock 4 Cooler
  • Keyboard
    Corsair Gaming K70 RGB
  • Mouse
    Logitech G520
  • Operating System
    Windows 10

Recent Profile Visitors

441 profile views
  • 2FA

Cherry's Achievements

  1. Using your code as a base, here's a functional version: http://js.do/code/ohgoodgodwhatamidoing2. I also switched up the way you were initialising your `score` array in your `student` function, as that was a little strange. You were almost there! You were parsing the arguments into the `avg` function as strings, but then referencing them as arrays. You already have the data you need, so I just through them through `parseInt` to ensure they were numbers. If the test scores could potentially be floats (numbers such as 3.14), you'll want to parse them through `parseFloat` instead, and likely round the result at the end to 2 decimal places, so to avoid any floating point number issues. You could have also just past the entire `score` array into your `avg` function, and then referenced it as an array by doing `score[1] + score[2]`, etc, rather than creating 4 separate function arguments. I'd recommend reading through https://developer.mozilla.org/en-US/docs/Learn/Getting_started_with_the_web/JavaScript_basics and then http://bdcampbell.net/javascript/book/javascript_the_good_parts.pdf for a more in-depth overview.
  2. HighCharts is great, but it's still only as "pre-built" as Rickshaw, Google Charts, or any other charting library. It simply provides a nice API to do what you want with, and that still requires at least some basic JS knowledge. Chart.js is another simple library I've used in the past, though I still find Rickshaw a lot more flexible. http://www.chartjs.org/docs/ You're more than welcome to throw me a PM if you'd like any assistance.
  3. I've used Rickshaw the past with a lot of success. It's built on top of d3, but makes interactive charts a lot easier to digest. Take a look at http://code.shutterstock.com/rickshaw/ and specifically http://code.shutterstock.com/rickshaw/examples/formatter.html which seems to be very similar to what you're after (though with only data set).
×