Skip to content

Category: Questions

Creating bell curve chart with xData in Highchart

I’m creating a chart with Highchart library and I have a set of data like this: [x,y], with x: value and y: occurrence. I tried to use this to present normal distribution line but it uses yData to calculate instead of xData. Does anyone have any ideas to solve this? jsfiddle link: https://jsfiddle.net/L…

Updating variables with Discord.JS

I’m trying to work out how to update variables that are declared at runtime. In my code it’s a simple random number generator. It works but doesn’t update, i.e. if the slash command /rng is used, alpha never updates past the initial number it picked, so it just repeats the same number at eac…

How can I beam the URL change on one page to another page?

I am writing some code currently being tested on localhost. The URL of one page that I am working on changes occasionally to add something after the # sign. For example, It will change from: to I want the other page open in the second monitor of the same PC with URL http://localhost/anything.php to know about…

What is the error “options.map is not a function”?

In the above code I get an error that options.map is not a function. How can this be resolved? The following code calls the above code. Answer im trying it and it cause of the data was late to read and the browser was too fast to read it so i tryin with this idk if it woukd be helps

JS: Nested Maps

I was trying to implement a [Wordle][1] assistant in JavaScript. I am new to JS, and I am sure the following is trivial, but maps are still confusing me. Suppose I have: How can I have the counts of unique items in the following format: (Would I do better with a different data structure?) (These are calculate…

Horizontal Bar Chart — unexpected offsetting of y-axis

I am trying to make a horizontal stacked bar chart, starting with this code snippet, updating to d3 v7. Instead of getting a neatly stacked bar chart, each subsequent bar in a stack is getting offset vertically down from where it should be. When I inspect the yScale value, I get the expected value, so I&#8217…