Reversing x domain on dc.js series chart - d3.js

Looking at this sample dc.js series chart:
How do I reverse the x-axis so it descends from 20 to 0, with the plotted series reversing accordingly?
I was able to do this in a pure d3.js chart by reversing the order of x.domain. When I try to do this for the chart above by changing:
.x(d3.scale.linear().domain([0,20]))
to
.x(d3.scale.linear().domain([20,0]))
The numbers on the x-axis reverse, but the lines disappear.

This looks like a bug, specifically this one:
https://github.com/dc-js/dc.js/issues/525

Related

D3 js: I want to know how to make a horizontal line according to the y-axis value

link : D3 Charting Tool: How to add label at right of target line (additional horizontal line) in column chart
I implemented the graph through this link.
The problem is that if there are multiple graphs and the y-axis values are different at the same height, if the horizon value is 10px, then 10px is output regardless of the y-axis range.
If i want to add horizontal lines according to the y-axis range, I'd like to know a solution.

Kendo Chart plot lines

I have a Kendo UI scatter plot representing trade volumes over a time series. The chart works well, but now I need to add a vertical plot line on the x-axis (time) at a specific time, representing a price-fluctuation point. Is it possible to draw such lines at a specific x-axis value, along with a label or tooltip explaining the data details? I see plot bands, but that seems not useful here.
Thanks in advance for any hints/suggestions.
I could add a new line series with points at (time, 0) and (time, y), but I would like to see if there is a better/API way before I go that route.

How to draw horizontal stacked area chart by ios-charts

I am using iOS Charts by Daniel Gindi.
I need to draw horizontal stacked area chart (Example). But I cannot find similar charts in examples of the library. I am trying to customise Horizontal Bar Chart like in example. But I cannot to avoid square corners.
How can I draw line instead of bars with squared corners?
Is it possible in this library or I should use another one?
Yes you can.
Use line chart instead ,and set drawFilledEnabled to true.
But the filled area is between line and x axis, so you may need to rotate the chart.

Dimple.js Candlestick Chart

I am using Dimple.js to plot several data series and I need to add a candlestick or hi/lo series on to my existing chart. After some analysis, I have found two possible approaches to do this:
1) Use the floating bar option in Dimple.js. Since the "widths" (heights on the chart, but widths for the floating bar) would be all different, I would need a different data series for each candlestick. This feels like a hack, but the one advantage is that this would be using Dimple to do all the rendering. I would probably not go this route unless some had a thought on how to make this less of a hack.
2) Drop down to D3 to draw lines between the points. I can use Dimple.js to graph both the top and bottom elements of the candlestick, then use D3 to draw the line between the points. I would do a selectAll() on one of the series, and then draw a path to the related point in the other series.
If there are other suggestions on an approach, please let me know. Thanks!
You can use this example to build candlestick charts using d3.js

Half pie chart with multiple values

How to create Half pie arc in d3
I'm following an example with full pie chart. How do I create Half pie chart?
code so far
http://tributary.io/inlet/5260888
Solution: http://tributary.io/inlet/5273835
d3's pie layout has functions to set the startAngle and engAngle properties which can create partial pie charts.
I had a similar requirement, however the missing part isn't half, but a changing fraction of the whole. in order to achieve this, I just set the "stroke" and "fill" for the missing segment to "none".

Resources