Forum Replies Created by Vishwas R

Viewing 15 posts - 1,096 through 1,110 (of 1,604 total)
  • in reply to: Pie chart problem #20638

    @tenjomo-herve,

    Please take a look at this example on rendering chart from mysql database.


    Vishwas R
    Team CanvasJS

    in reply to: Colorset base on dropdown #20629

    @yansonalvin97,

    You can update all available chart-options dynamically. Just like the way you were able to change chart-type from dropdown you can change colorset aswell. Please take a look at this jsfiddle.


    Vishwas R
    Team CanvasJS

    in reply to: Draw same line at axixY and axixY2. #20628

    @kinokatsu,

    Do you mean showing axisY line? If so, varying axisX minimum slightly will make it visible. axisY line is not visible due to minimum set in axisX. Please take a look at this updated jsfiddle.


    Vishwas R
    Team CanvasJS

    in reply to: Draw same line at axixY and axixY2. #20626

    @kinokatsu,

    You can attach an empty dataSeries to axisY2 and set minimum and maximum to that of axisY using set method. Please take a look at this updated jsfiddle.


    Vishwas R
    Team CanvasJS

    in reply to: CanvasJS not defined #20619

    Alex,

    Can you kindly share a sample project along with sample data over google-drive or one-drive so that we can look into your code, understand it better and help you out?


    Vishwas R
    Team CanvasJS

    in reply to: Multi Series Chart – Pie Graph #20618

    @yansonalvin97,

    Incase of multiseries chart, there will be only one chart-container and multiple dataSeries. Whereas if you like to have 3 different pie charts there should be 3 different chart-containers. You can achieve this by creating 3 separate chart-containers and 3 different charts using the existing chart-options and updating it back again when other chart-type is selected. Please take a look at this jsfiddle.


    Vishwas R
    Team CanvasJS

    in reply to: panning of graph stucks #20616

    @DDietz,

    Thanks for reporting the issue. We will look into the issue and fix it in future releases.


    Vishwas R
    Team CanvasJS

    in reply to: Creating Multi Series Chart in AJAX with JSON #20615

    @yansonalvin97,

    You can add dropdown to either course or college or based on both and updating the chart options according to the drop-down option that has been selected will work fine. Please find the code-snippet below.

    var data = chart.options.data;
    var selectedChartType = 'stackedColumn';
    var chartType = document.getElementById('chartType');
    chartType.addEventListener( "change",  function(){
      selectedChartType = chartType.options[chartType.selectedIndex].value;
      for(var i= 0; i < chart.options.data.length; i++){
        chart.options.data[i].type = chartType.options[chartType.selectedIndex].value;
      }
      chart.render();
    });
    
    var college = document.getElementById('college');
    college.addEventListener( "change",  function(){
      var dataSeries;    
      chart.options.data = [];
      for(var i= 0; i < data.length; i++){
        if(data[i].college === college.options[college.selectedIndex].value){        			
          dataSeries = data[i];
          dataSeries.type = selectedChartType;
    
          chart.options.data.push(dataSeries);
        }
        else if(college.options[college.selectedIndex].value === ""){
          for(var i = 0; i < data.length; i++){
            data[i].type = selectedChartType;
          }
          chart.options.data = data;    
        }
      }    
    
      chart.render();
    });

    Please take a look at this updated JSFiddle for complete code.


    Vishwas R
    Team CanvasJS

    in reply to: json file #20614

    @natasha11,

    It seems like dataPoints are not being updated properly.
    Chart from JSON

    Can you kindly share the sample project with sample JSON over google-drive or onedrive so that we can understand it better and help you out?


    Vishwas R
    Team CanvasJS

    in reply to: The label on the X axis protrudes. #20613

    @kinokatsu,

    In the current approach that you are following, label to the right extreme gets clipped as you are setting axis maximum. To overcome this, either you can rotate labels or increase axis maximum by 20-30minutes. Please take a look at this updated jsfiddle


    Vishwas R
    Team CanvasJS

    in reply to: Styling of Stripline Labels #20603

    [UPDATE]

    We have released Chart v3.9.0GA with stripline labelTextAlign property that lets you align the stripline label. Please refer to the release blog for more information.


    @DDietz
    ,

    Sorry, aligning text in stripline label to the center is not available as of now. We will consider it for future releases.


    Vishwas R
    Team CanvasJS

    in reply to: Display only integer values for ticks #20602

    @psergey,

    You can set interval to 1 to avoid showing values between the dataPoint x-values. Please take a look at this updated JSFiddle. Alternately, you can also use labels instead of x to do the same as shown in this JSFiddle.

    Labels & Index Labels in Chart


    Vishwas R
    Team CanvasJS

    in reply to: zoom not working. #20594

    @kinokatsu,

    Yes, as there are only 2 dataPoints attached to secondary y-axis, it invalidates the zooming region over y-axis.


    Vishwas R
    Team CanvasJS

    in reply to: MVC Deployment problem #20592

    @sharavanaprakash1991,

    Please refer this article on deploying MVC5 app in IIS. Also please check for the error you are getting and try troubleshooting it as mentioned in this page.


    Vishwas R
    Team CanvasJS

    in reply to: Creating Multi Series Chart in AJAX with JSON #20591

    @yansonalvin97,

    You can modify and customize chart-options dynamically. Adding another dropdown to filter based on department/course should work fine if you handle chart-options accordingly. Below is the code snippet for the same.

    var courseName = document.getElementById('courseName');
    courseName.addEventListener( "change",  function(){
    		var dataSeries;    
        for(var i= 0; i < data.length; i++){
            if(data[i].name === courseName.options[courseName.selectedIndex].value){        			
            			dataSeries = data[i];
                  dataSeries.type = selectedChartType;
                  chart.options.data = [];
                  chart.options.data.push(dataSeries);
            }
            else if(courseName.options[courseName.selectedIndex].value === ""){
            		for(var i = 0; i < data.length; i++){
                		data[i].type = selectedChartType;
                }
        				chart.options.data = data;    
            }
        }    
        
        chart.render();
    });

    Please take a look at this updated jsfiddle.


    Vishwas R
    Team CanvasJS

Viewing 15 posts - 1,096 through 1,110 (of 1,604 total)