1

My need is to implement following graph

enter image description here

I know about stacked chart, but here there are axis points labels (In my need there is no any axes point labels), and this is from Y-axis.

I am confused how can I implement it.

Can you please help me? Any link will also be helpful.


Update :

I am trying a code snippet

<script type="text/javascript" language="javascript">

  $(document).ready(function(){
      var line1 = [14];
      var line2 = [77];
      var plot4 = $.jqplot('test2', [line1, line2], {
          title: '1 Mobility Test Graph',
          animate: !$.jqplot.use_excanvas,
          stackSeries: true, 
          seriesDefaults: {
              renderer: $.jqplot.BarRenderer,
              rendererOptions:{barPadding : 0, barMargin : 5, barDirection: 'horizontal'}, 
              pointLabels:{location : 'e', edgeTolerance : 0, hideZeros: true, show : true},
              shadowAngle : 135,
              lineWidth : 0,
              showLine: true
          },
          axesDefaults : {
                show : false,
                tickOptions : {
                    show : false
                }
            },
          axes: {
              yaxis:{renderer:$.jqplot.CategoryAxisRenderer}
          },
          grid:{
                borderWidth:0, 
                shadow:false
            },
          legend: {
                renderer: $.jqplot.EnhancedLegendRenderer,
                show:true,
                rendererOptions:{
                    numberRows:1,
                    numberColumns: 3,
                    disableIEFading: false
                },
                location: 'n',
                placement : 'outsideGrid',
                marginTop: '5px',
                showSwatch:false
          }
      });
      $(".jqplot-xaxis-tick").hide();
      $(".jqplot-yaxis-tick").hide();
    });
</script>

But this doesn't give me any output. When I remove barDirection: 'horizontal' its working fine. Please help me, what is wrong...

Here I got jsfiddle , but it works for two graphs..... how can I make for one.

1 Answer 1

1

Are you after something like this? You have a single stacked horizontal bar there. As per examples in doc with horizontal bar chart you must give the chart an array of series where each one has values as two values arrays ([x,y]) where x is value and y is series id.

Or another option would be to give the chart a single array of single value arrays, as shown here.

Sign up to request clarification or add additional context in comments.

2 Comments

Yes you are right... I am looking for the same... but how can I show points labels in center of section?
Hi Boro can you help me for my another question pliz stackoverflow.com/questions/12955524/…

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.