Note that there are some explanatory texts on larger screens.

plurals
  1. PO
    primarykey
    data
    text
    <p>By the look of your code the series z will already be coloured by STATUS meaning all you need to do is assign some specific colours:</p> <pre><code>var z = myChart.addSeries(["Version","Id","STATUS"], dimple.plot.line); myChart.assignColor("PASS", "blue"); myChart.assignColor("FAIL", "red"); myChart.addLegend(60, 10, 500, 20, "left", z); myChart.draw(); </code></pre> <p>though you'd probably want to specify some slightly nicer shades of red and blue.</p> <p>There are more options and you can see more detail on assignColour here:</p> <p><a href="https://github.com/PMSI-AlignAlytics/dimple/wiki/dimple.chart#wiki-assignColor" rel="nofollow">https://github.com/PMSI-AlignAlytics/dimple/wiki/dimple.chart#wiki-assignColor</a></p> <p>To size points based on a category you need to encode them to numbers and plot them as bubbles on the z axis, which you can do as follows. The bubble series will line up with the points of the line chart making them look like sized markers.</p> <pre><code>data.forEach(function (d) { d["Status Score"] = (d.STATUS === "PASS" ? 80 : 100); }, this); var myChart = new dimple.chart(svg, data); var x = myChart.addAxis("x","Id"); x.addOrderRule("Id"); var y = myChart.addMeasureAxis("y", "VALUE"); y.tickFormat = ","; var z = myChart.addMeasureAxis("z", "Status Score"); z.overrideMin = 0; z.overrideMax = 100; myChart.addSeries(null, dimple.plot.line); myChart.addSeries(["Version","Id","STATUS"], dimple.plot.line); myChart.addSeries(["Version","Id","STATUS"], dimple.plot.bubble); myChart.addLegend(60, 10, 500, 20, "left", z); myChart.draw(); </code></pre> <p>Here I'm encoding Pass as 80 and Fail as 100 (assuming those are the only 2 statuses). I'm then fixing the bubble size (z axis) from minimum 0 to maximum 100. That means that 100 is the full size bubble and 0 is the smallest bubble, so you can play with the scores in the status score to make you bubbles the desired size.</p>
    singulars
    1. This table or related slice is empty.
    plurals
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. VO
      singulars
      1. This table or related slice is empty.
    2. VO
      singulars
      1. This table or related slice is empty.
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload