Using D3.JS
I have a running Bar Graph sample in here
This is composed of 3 rect per Day.
First is the black one, seconds is the blue one and the third is the orange.
My problem is to just to arrange the graph with its designated location.
Any idea is much appreciated.
Related
I am using Rgraph and I want to show average at the top of each stacked bar graph.
How can we do that?
First StackOverflow question in ages - take a chocolate!
For this you can use the labelsAbove option - like these examples:
[UPDATE: See below]
These are stacked Bar charts:
[UPDATE: See below]
This one is slightly different in that it adds the labels when the wave animation effect is finished:
[UPDATE: See below]
Or this one shows the labels at the top of the chart:
[UPDATE: See below]
Update: All the demos are available in the download archive:
https://www.rgraph.net/download.html#stable
I'm trying to make a highstock chart where the navigator shows summarized data of whats in the main chart. For example, the main chart area will be showing multiple series of a weeks worth of time series data in 5-minute increments while the navigator will have show the whole time series (potentially years long) span in 4 hour increments for each line in the main chart. How should I go about adding these custom series to the navigator?
What i would like: (not in highcharts)
Note the gray backround graph showing the average trend
What i currently have: (made with highcharts)
I managed to implement the stacked area chart, but i would like to add the grey average graph in the background.
Could anyone tell me if and how this is possible?
Thanks!
The answer was simply adding the "stack" variable to my series, which allows you to build multiple stacks of "stacked area" charts: one for the actual values, one for the average of last week. Thanks to everyone for their input
I am fairly new to JavaScript, let alone charting. I'd appreciate any help in accomplishing the following. I have browsed many JavaScript charting libraries and examples but have not seen any that solve my problem:
I need to create dynamic stacked bar charts as shown in the attached picture. Horizontal axis is time axis. The chart should scroll to left with time along with time-markings on x-axis. Each horizontal stacked bar is for a different item on Y-axis. There will be many items on y axis. Each section of bar will have text as shown. The information about each section and its text is received dynamically.
Thank you!
See the desired end result in this image
I have found the Google Charts to be very, very easy to use (https://developers.google.com/chart/?hl=en)
However, in order to have dynamic content, you'll need to have some data source to read from so that you can use something like ajax to constantly ping it for updated data. The Google Charts library will give you a good starting point but it won't be dynamic. You'll have to program that portion but Google Charts is very great in providing you with the basic pie, graph, bar, etc.. 'chart templates' so switching between a bar and a pie chart is super easy.
I'm wondering whether there is some high level way of having more than one brush on a graph. Here's the problem:
I have a stacked bar chart where each bar represents one weekday and different metrics are stacked on top of one another (stacked line charts are not available yet as far as I know). Now I would like to let the user select the days to display (and the selection should propagate into the other graphs). Everything works great with the brush on, but if you want to choose Sunday, which is at the end of the graph, and Monday which is at the beginning, you can't do that using a single brush. Anybody knows of a way to add more brushes?
Alternatively I'm looking for a way to add a click event listener that would "activate" the day you click on in a similar way like a ring chart section would work.
Thanks a lot for your ideas,
Renra
You could try using an ordinal x axis instead of a linear one. The default behavior for ordinal bar charts is to click to select/deselect bars instead of range selection.
That's chart.x(d3.scale.ordinal()).xUnits(dc.units.ordinal). If you are using dc 1.7.1 of earlier, you may have to specify the domain by d3.scale.ordinal().domain([’Monday',...])