From the course: DC.js for Data Science Essential Training

Unlock the full course today

Join today to access over 23,200 courses taught by industry experts.

Combining chart types with composite

Combining chart types with composite - JavaScript Tutorial

From the course: DC.js for Data Science Essential Training

Combining chart types with composite

- [Voiceover] With a series chart all of your series are the same chart type. But what if you wanted to show two different chart types, on the same axis? For example this one, where we're showing a line chart and a scatter chart there as well. Now in this example, the line chart is the average result that was found from the Morley experiment, and then in pink behind it we're showing the actual data points that feed into the average. So we're going to recreate this chart now using DC composite chart, and I'm going to begin using series chart for this one. I'll just call it "composite chart". And we're going to carry on using the Morley data, so we can carry on using our data type conversions, all of that is fine. Now let's remove a few things here that we don't need. We're not going to need those accessor functions, or chart, or legend. Now we're going to declare a dimension on run. And we already got one here, but actually we don't need an array this time. We can just return the…

Contents