score:1
I noticed that you haven't got any answers so I thought of sharing my idea if it will help you by any chance.
As I see, it won't be easy to plot a multi line chart with the structure of the data you have. If you have any control over the structure of your data, then perhaps changing it to some format like below would make things a lot easier.
var svg = dimple.newSvg("#chartContainer", 590, 400);
var data = [
{ "Date":"01/01/2018", "Mode":"Sunrise", "Time":"08:10" },
{ "Date":"02/01/2018", "Mode":"Sunrise", "Time":"09:01" },
{ "Date":"03/01/2018", "Mode":"Sunrise", "Time":"09:30" },
{ "Date":"04/01/2018", "Mode":"Sunrise", "Time":"08:05" },
{ "Date":"05/01/2018", "Mode":"Sunrise", "Time":"08:10" },
{ "Date":"06/01/2018", "Mode":"Sunrise", "Time":"08:35" },
{ "Date":"01/01/2018", "Mode":"Sunset", "Time":"16:20" },
{ "Date":"02/01/2018", "Mode":"Sunset", "Time":"15:25" },
{ "Date":"03/01/2018", "Mode":"Sunset", "Time":"14:05" },
{ "Date":"04/01/2018", "Mode":"Sunset", "Time":"15:10" },
{ "Date":"05/01/2018", "Mode":"Sunset", "Time":"16:02" },
{ "Date":"06/01/2018", "Mode":"Sunset", "Time":"15:15" },
];
var myChart = new dimple.chart(svg, data);
myChart.setBounds(70, 40, 490, 320)
var x = myChart.addTimeAxis("x", "Date", "%d/%m/%Y", "%d/%m/%Y");
var y = myChart.addTimeAxis("y", "Time","%H:%M", "%H:%M");
var parseTime = d3.timeParse("%H:%M:%S");
y.overrideMin = parseTime("07:00:00");
y.overrideMax = parseTime("19:00:00");
var s = myChart.addSeries("Mode", dimple.plot.line);
s.interpolation = "cardinal";
s.lineMarkers = true;
myChart.draw();
Here the thing is how I have changed the structure of the data array.
I know this is not really the solution for your exact case. But I thought it would be worth sharing. :)
Check the fiddle : Fiddle, data are just sample values to make it appear nice.
I hope it helps.
Source: stackoverflow.com
Related Query
- Problems rendering chart with Dimple.js
- Problems while reproducing Sankey chart example with d3_sankey
- Override D3 Dimple tooltips with chart data
- area chart with d3 is not rendering on jsp page but working fine with html
- How to change D3 Dimple tooltips with chart data?
- rendering issue in d3 radial bar chart with labels
- d3 pie chart problems with exiting entering
- dc.js - Chart not rendering (single row bar chart - horizontal row), with the exception of legend, axes and tick marks/values (which do render)
- Draw Chart using Dimple JS with DSV format data
- Problems with grouped bar chart
- dimple js x-axis date issue with bar chart
- Problems in rendering D3.js Area Chart
- update series order in dimple multi-series chart with interactivity
- d3.js - Pie chart with interactive legend hover problems
- Rendering d3. chart with Ember.js and a Node.js/mongodb backend
- Javascript issue with rendering updated chart in D3
- D3: How to refresh a chart with new data?
- Bar chart with negative values
- MultiBar chart with nvd3 / d3 only shows labels for every other tick on the x-axis. How can I get them all to show up?
- nvd3 line chart with string values on x-axis
- D3.JS time-series line chart with real-time data, panning and zooming
- Multiseries line chart with mouseover tooltip
- d3.js chart area filling with different colors
- How to update d3.js bar chart with new data
- D3: gauge chart with growing arc
- d3.js pie chart with angled/horizontal labels
- NVD3 line chart with realtime data
- javascript charting - nvd3 line chart with two Y-axis
- Make simple bar chart using C3 with separate columns on the x axis
- d3 Line Chart with enter-update-exit logic
More Query from same tag
- D3 - Correct number of elements on update, but wrong values
- Error: <path> attribute d: Expected arc flag ('0' or '1')
- How to disable double click zoom for d3.behavior.zoom?
- Select the children of a node from a tree in d3.js
- Getting same value from javascript function
- d3.js Search functionality in collapsible tree
- d3.js - Autoscroll for pie chart legend
- Zoom with drill-down capability
- Read csv to object of object for d3 [datamaps]
- Accessing different parts of json in a d3 chart function
- d3js v4 bubble chart - getting force/gravity effects back
- Angular-nvD3 resizes chart on data change
- .style("background-position", function(){...}) not populating the attribute
- Getting average of object within an array
- d3 angular 2 pie chart d3.arc type error
- Inserting nodes into D3 pack layout (pagination on zoom)
- How to plot different line patterns for different lines in DC.js series chart?
- D3.js line chart grid issue
- i change the "class" attribute of a node that exist in SVG, but not applied ! why?
- d3.js: click event in a bubble/scatter chart
- How to increase the axis?
- d3 mouseover event with Angular 6
- MeteorJS : Template rendered & Meteor method call
- Adding fisheye to axes with D3 JS
- Overriding d3 TypeScript definition file
- Tooltip scaled(zoom) along with d3 geo map
- Can I use index.html and ui.r for my r shiny interface?
- Animating circle clip on D3 Geo Azimuthal
- Draw curve between two points using diagonal function in d3 js
- How to add a nice legend to a d3 pie chart