Forum Replies Created by StefanA

Viewing 7 posts - 1 through 7 (of 7 total)
  • in reply to: Graph a CSV file #8692

    Ok, I will try to run the code via a server. Thanks for your help.
    // Stefan

    in reply to: Graph a CSV file #8675

    CSV file pasted from notepad


    in reply to: Graph a CSV file #8669

    This is really annoying. The csv chart seems so work for everybody but me. I must be really stupid. All i get is a blank web page. Can someone please help me figure it out?

    screencap of html source
    > screencap of csv
    screencap of folder

    in reply to: Graph a CSV file #8613

    I can’t get the code from reply #8604 to work. Trying to run the code locally/offline on my PC but no chart is drawn.

    in reply to: Graph a CSV file #8607

    I downloaded jquery-2.1.1.js core and put it in the same folder as the rest of the documents. Can I now simply copy your code above into a html document and run it in my browser and it will produce a chart based on my csv file?

    in reply to: Graph a CSV file #8600

    You must excuse my lack of knowledge when it comes to these things. What is the console? This is the code I trying to use:

    <meta http-equiv="Content-Type" content="text/html; charset=utf-8">
    <script type="text/javascript" src="jquery.canvasjs.min.js"></script>
    <script type="text/javascript">
    $(document).ready(function () {
    		type: "GET",
    		dataType: "text",
    		success: function(data) {processData(data);}
    	function processData( allText ) {
    		var allLinesArray = allText.split("\n");
    		if( allLinesArray.length > 0 ){
    			var dataPoints = [];
    			for (var i = 0; i <= allLinesArray.length-1; i++) {
    				var rowData = allLinesArray[i].split(",");
    				dataPoints.push({ label:rowData[0], y:parseInt(rowData[1]) });
    	function drawChart( dataPoints) {
    		var chart = new CanvasJS.Chart("chartContainer", {
    				text: "ID"
    				labelAngle: 0,
    				labelAutoFit: false,
    				labelFontSize: 15,
    				labelMaxWidth: 200,
    				labelFontColor: "black"
    			data: [
    				indexLabelPlacement: "outside",
    				indexLabelFontWeight: "bold",
    				indexLabelFontColor: "black",
    				type: "column",
    				dataPoints: dataPoints
    <script type="text/javascript" src="canvasjs.min.js"></script>
        <div id="chartContainer" style="height: 300px; width: 100%;">
        </div><center><b>This a test text</b></center>

    My csv file called logg.csv looks like this:

    in reply to: Graph a CSV file #8580

    I’m also trying to chart a csv file. Since I have no experience of javascript programming I simply copy the example code in this post and hoped for the best :)

    I must however do something fundamentally wrong since no chart is visible on my html page.

    I have a html page with with code from replay #8498. A data2.csv file and the jquery.canvasjs.min.js and canvasjs.min.js together in the same folder. Can you tell me what I have missed?

    Best Regards

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