I am working on Recat.js and using rechart library for chart implementation. I want to give string value on the y axis as label and workout on some numbers included in the json data in x axis. here Iam giving my code I don’t why its not working properly. the value key pair has to gone through x axis and
Tag: charts
D3 Bar Chart Negative Values not Showing Up
In my bar chart, I have both negative values and positive values, but the problem is, The negative bars don’t get plotted in the opposite direction (Inverted) rather, they are plotted in the same direction as the positive bars. I understand, the Y-Axis domain, can’t start with 0 when dealing with negative values. But when I use d3.min to get
Google charts javascript : Stacked column, transparent color
Here is the stacked chart I have, I would like to be able to change the color of the session (here red) in transparent. Would you have an idea ? thanks. And here is my code : Answer you can use ‘transparent’ as the color name, here… see following working snippet…
Can Chart.js Horizontal bar work with time series data?
I am trying to develop a stacked bar graph based on time series data. The data is representing the running of a machine logged to Influx. Looking about I have not seen this done and cannot seem to get my data to line up correctly to make the stacked bar chart. Essentially I want to show one color for running
I want to remove the commas from the X axis with d3, but tickFormat does not work and instead, throws an error
I am making a bar chart with the years on the X axis. Currently trying to remove the commas using, tickFormat() but it throws an error. Does anyone know what is wrong? My code: Answer Turns out I had to nest it inside the call for the axis.
Chart.JS tooltip callbacks label and title (v3.5)
(Please note: There are lots of answers for v2, this is for v3) I’m trying to setup tooltips label and title for a doughnut chart. Code: The label now works, and displays the value of the data, but the title is returning blank, instead of returning the label of the data (“Positive” or “Other”). How can I return the correct
Putting label array to the chartjs?
I have these codes: let arr = []; This is what console.log(arr); shows: [“Item1”, “Item2”, “Item3”, “Item4”] Below is my graph: How can I loop through the object arr to be put inside the labels? Answer The charts label receives a string or an array of strings: So you will put your array directly to the labels like so: A
trying to create line down a graph in nivo at set time intervals
I’m using nivo charts to visualize some sick datasets. The example is like this, With the data simply like this, I want to really simply add in a at time 10, 14, 18 a line for when i exercise. Ideally, I’d like to be able to shade the area beneath that line for 4 hours afterwards, in a sort of
how can i create a segmented colored line using lightning chart js? [closed]
Closed. This question needs details or clarity. It is not currently accepting answers. Want to improve this question? Add details and clarify the problem by editing this post. Closed 1 year ago. Improve this question Can anyone draw a segment line using this library? I tried using addsegmentseries method but it didn’t work. Answer Found the answer myself. A segment
React with Svg vertical stacked barchart (no third party library)
I have below piece of code. I am using React and svg for bar charts. I am not using any third party library for charts. With this below piece of code, i am able to get the bar charts. But the issue is that my bar charts show horizontally, I want to show it vertically. I am not able to