Question

I'm using Sparklines and am trying to draw a simple blox plot with predetermined min, max, whiskers, quartiles, and one additional value -- the user's value that might fall within the quartile or outside (the whole point is to show the user where his/her value falls in the distribution)

What is the appropriate way to do this? I can get a basic box up but can't see how to lay a point on top of it. Also I can't see how to set min and max but it looks like the outliers sort of do this.

Here's my code:

<script type="text/javascript">
  $(function() {
    var myboxvalues = [0, 200, 450, 500, 550, 800, 1000];
    $('.inlinebox').sparkline( myboxvalues, {type: 'box', raw: true });
  });
</script>
</head>
<body>
<p>
My box: <span class="inlinebox"></span>
</p>

Thanks!

Was it helpful?

Solution

The flag is "target: ..."

{type: 'box', raw: true, target: 713 }
Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top