I am using C3 to generate a chart and have found it necessary to dig into the underlying D3 constructs to supplement its functionality. I'm at an impasse and need to draw a region that is both limited by the x values and the y values but the "regions" functionality of C3 only allows one or the other. So, I need to draw on the C3-generated chart a rect at the appropriate location but using the scale functions to determine the X/Y values of the new rect. Is there any way to do this with C3 or underlying D3 library?
相关问题
- Highlight parent path to the root
- Avoid overlapping of nodes in tree layout in d3.js
- d3.js moving average with previous and next data v
- How to make limits on the Y axis be the same using
- Google Charts-Code for Category Filter
相关文章
- Mercurial Commit Charts / Graphs [closed]
- Change color of bars depending on value in Highcha
- D3.js: Stop transitions interrupting on mouseover?
- Adding text to the center of a D3 Donut Graph
- rect collision detection d3js
- Pausing and resuming a transition
- D3 grouped bar chart: How to rotate the text of x
-
Error:
attribute d: Expected number, “MNaN,
You can access the scale function from the chart.internal (chart.internal.x and chart.internal.y). You'll probably need the margins too (otherwise your positions will be offset by that much)
Here's how you draw a rectangle from point (0 index, 100) to (2 index, 400)
Fiddle - http://jsfiddle.net/hehpy91o/