Forum Replies Created by jaybe

Viewing 5 posts - 1 through 5 (of 5 total)
  • in reply to: Label Position in the middle of a stacked bar #5191

    Thank you very much for your work :)

    in reply to: Label Position in the middle of a stacked bar #5180

    no changes after new download.but i found something interresting by chaning the browser width with my mouse while having the div width set on 100%. in some browser width i see both values. so when i set my div width on 399px it works. but when i set them to 398px or 400px it dont work. you can test it on my fiddle. dont know why.

    Is there a way to set the values in the middle of the bar ?
    Can i disable the label if the value is null ?

    in reply to: Label Position in the middle of a stacked bar #5177

    Here is my Fiddle: http://jsfiddle.net/jaybe/Dd66M/
    There both value are working. But on my local html version it does not work. It only shows the first value when both values are the same. Hmmm.
    I thought it was because i dont have my div width to 100%. But this also dont work here on my version.

    PS: The thing with more charts is working now :) Thanks.

    in reply to: Label Position in the middle of a stacked bar #5175

    And another question: How could i display more than one chart on one site. I tried:

    <div id="chart1" style="height: 100px; width: 300px;">  </div>
    <div id="chart2" style="height: 100px; width: 300px;">  </div>
    

    That is my Code. But it only shows the last div :( (only one chart)

    
    <script type="text/javascript">
    	//Chart fuer Tore Start
      window.onload = function () {
        var chart = new CanvasJS.Chart("chart_tore",
        {
    	creditText: "",
    	axisY:{
    lineThickness:0,
    tickThickness:0,
    valueFormatString:" ",//space
    gridThickness:0,
    
    },
    axisX:{
    lineThickness:0,
    tickThickness:0,
    valueFormatString:" ",//space
    labelFontSize:0,
    },
          title:{
            //text: "Tore und dies unddas",
    		fontSize:20,
    		verticalAlign: "center", 
            horizontalAlign: "left",
    			
          },
    	  toolTip: {
    	  enabled:false,
    	  },
          data:[
          {
    	    indexLabel: "{y}",
    		indexLabelFontSize: 20,
    		indexLabelPlacement: "inside",
    		color: "#151515",
            type: "stackedBar100",
            dataPoints: [
    		{y: bartore_home, label: "Tore" },
    		
            
            ]
          },       
          {
            indexLabel: "{y}",
    		indexLabelFontSize: 20,
    		indexLabelPlacement: "inside",
    		color: "#F2F2F2",  
    		type: "stackedBar100",
            dataPoints: [
            {y: bartore_away, label: "Tore" },
            
            ]
          },
    	  
    	  
    	  
    
          ]
    
        });
    
    chart.render();
    }
    //Chart fuer Tore Ende
    
    //Chart fuer Gelb Start
      window.onload = function () {
        var chart = new CanvasJS.Chart("chart_gelb",
        {
    	creditText: "",
    	axisY:{
    lineThickness:0,
    tickThickness:0,
    valueFormatString:" ",//space
    gridThickness:0,
    
    },
    axisX:{
    lineThickness:0,
    tickThickness:0,
    valueFormatString:" ",//space
    labelFontSize:0,
    },
          title:{
            //text: "Tore und dies unddas",
    		fontSize:20,
    		verticalAlign: "center", 
            horizontalAlign: "left",
    			
          },
    	  toolTip: {
    	  enabled:false,
    	  },
          data:[
          {
    	    indexLabel: "{y}",
    		indexLabelFontSize: 20,
    		indexLabelPlacement: "inside",
    		color: "#151515",
            type: "stackedBar100",
            dataPoints: [
    		{y: bargelb_home, label: "Tore" },
    		
            
            ]
          },       
          {
            indexLabel: "{y}",
    		indexLabelFontSize: 20,
    		indexLabelPlacement: "inside",
    		color: "#F2F2F2",  
    		type: "stackedBar100",
            dataPoints: [
            {y: bargelb_away, label: "Tore" },
            
            ]
          },
    	  
    	  
    	  
    
          ]
    
        });
    
    chart.render();
    }
    //Chart fuer Gelb Ende
    </script>
    
    in reply to: Label Position in the middle of a stacked bar #5174

    The Problem only exists when both values are the same (e.g. “2”). If they are different it works.

    My second question: Can i show them in the middle of the bar and not on the right side ?

Viewing 5 posts - 1 through 5 (of 5 total)