Highchart shows blank page using CodeigniterIs there a way to disable the Title and Subtitle in Highcharts?Highcharts show menu buttons alongside blank titleMulti series Highcharts not plotting graph , json format?How to get categories from a database for highcharts using codeigniterblank page in HighchartsHighcharts: generate blank chartBlank Datas in highcharts using Codeigniter and highchartsHighcharts show blank colum with textJSON getting data from multidimensional arraysHighchart Pie chat not display Codeigniter

Can a stored procedure reference the database in which it is stored?

As an international instructor, should I openly talk about my accent?

NPN: Not fully sinking to GND

Was Dennis Ritchie being too modest in this quote about C and Pascal?

Negative Resistance

Why must Chinese maps be obfuscated?

I preordered a game on my Xbox while on the home screen of my friend's account. Which of us owns the game?

What makes accurate emulation of old systems a difficult task?

Nails holding drywall

Drawing a german abacus as in the books of Adam Ries

What is the most expensive material in the world that could be used to create Pun-Pun's lute?

How much of a wave function must reside inside event horizon for it to be consumed by the black hole?

What to do with someone that cheated their way through university and a PhD program?

Could moose/elk survive in the Amazon forest?

Can a level 2 Warlock take one level in rogue, then continue advancing as a warlock?

Check if a string is entirely made of the same substring

How much cash can I safely carry into the USA and avoid civil forfeiture?

Combinatorics problem, right solution?

Where was the County of Thurn und Taxis located?

Mistake in years of experience in resume?

Multiple options vs single option UI

Double-nominative constructions and “von”

What does "function" actually mean in music?

What was Apollo 13's "Little Jolt" after MECO?



Highchart shows blank page using Codeigniter


Is there a way to disable the Title and Subtitle in Highcharts?Highcharts show menu buttons alongside blank titleMulti series Highcharts not plotting graph , json format?How to get categories from a database for highcharts using codeigniterblank page in HighchartsHighcharts: generate blank chartBlank Datas in highcharts using Codeigniter and highchartsHighcharts show blank colum with textJSON getting data from multidimensional arraysHighchart Pie chat not display Codeigniter






.everyoneloves__top-leaderboard:empty,.everyoneloves__mid-leaderboard:empty,.everyoneloves__bot-mid-leaderboard:empty height:90px;width:728px;box-sizing:border-box;








0















As a beginner in learning highchart, I cannot find out why the chart cannot display in the view. My controller displays the json data properly but when I call the controller in the $.getJSON to display the data in the chart I got a blank page.



Can someone help me to make the chart display in the View ?



Thanks



My controller



public function chartBarData() 

$query1 = $this->model_admin->getBarCha1('2019-01-24','2019-01-25');
$category = array();
$category['name'] = 'Medico';

$series1 = array();
$series1['name'] = 'Paciente';


foreach ($query1 as $row)

$category['data'][] = $row->Medico;
$series1['data'][] = $row->Paciente;



$result = array();
array_push($result,$category);
array_push($result,$series1);


print json_encode($result, JSON_NUMERIC_CHECK);



print json_encode($result, JSON_NUMERIC_CHECK) result :



["name":"Medico","data":["baptiste prophete","JUAN ALBERTO SUERO","ADRIANA MATEO","RAUL ARISTY COMAS","VICTORIA LILA FRANCO","IVANHOE LINARES VENTURA"],"name":"Paciente","data":[2,3,15,13,1,6]]


The view



<div id="container" style="min-width: 310px; height: 400px; max-width: 600px; margin: 0 auto"></div>
<script src="https://code.highcharts.com/highcharts.js"></script>
<script src="https://code.highcharts.com/modules/exporting.js"></script>
<script src="https://code.highcharts.com/modules/export-data.js"></script>

<script type="text/javascript">

$(document).ready(function()
var options =
chart:
renderTo: 'container',
type: 'column',
marginRight: 130,
marginBottom: 25
,
title:
text: 'Doctor patients view',
x: -20 //center
,
subtitle:
text: '',
x: -20
,
xAxis:
categories: []
,
yAxis:
title:
text: 'Amount'
,
plotLines: [
value: 0,
width: 1,
color: '#808080'
]
,
tooltip:
formatter: function()
return '<b>'+ this.series.name +'</b><br/>'+
this.x +': '+ this.y;

,
legend:
layout: 'vertical',
align: 'right',
verticalAlign: 'top',
x: -10,
y: 100,
borderWidth: 0
,
series: []


$.getJSON("<?php echo site_url('chartBarData');?>", function(json)
options.xAxis.categories = json[0]['data'];
options.series[0] = json[1];
chart = new Highcharts.Chart(options);
);
);
</script>









share|improve this question

















  • 1





    Hi @Diasline, I have tested your data structure and chart options, and your code works correctly: jsfiddle.net/BlackLabel/txv0f5Lc The problem is not on the JS side.

    – ppotaczek
    Mar 23 at 3:40











  • You are right, I just tested online it works, it could not work on localhost. Thank you brothter.

    – Diasline
    Mar 24 at 17:29

















0















As a beginner in learning highchart, I cannot find out why the chart cannot display in the view. My controller displays the json data properly but when I call the controller in the $.getJSON to display the data in the chart I got a blank page.



Can someone help me to make the chart display in the View ?



Thanks



My controller



public function chartBarData() 

$query1 = $this->model_admin->getBarCha1('2019-01-24','2019-01-25');
$category = array();
$category['name'] = 'Medico';

$series1 = array();
$series1['name'] = 'Paciente';


foreach ($query1 as $row)

$category['data'][] = $row->Medico;
$series1['data'][] = $row->Paciente;



$result = array();
array_push($result,$category);
array_push($result,$series1);


print json_encode($result, JSON_NUMERIC_CHECK);



print json_encode($result, JSON_NUMERIC_CHECK) result :



["name":"Medico","data":["baptiste prophete","JUAN ALBERTO SUERO","ADRIANA MATEO","RAUL ARISTY COMAS","VICTORIA LILA FRANCO","IVANHOE LINARES VENTURA"],"name":"Paciente","data":[2,3,15,13,1,6]]


The view



<div id="container" style="min-width: 310px; height: 400px; max-width: 600px; margin: 0 auto"></div>
<script src="https://code.highcharts.com/highcharts.js"></script>
<script src="https://code.highcharts.com/modules/exporting.js"></script>
<script src="https://code.highcharts.com/modules/export-data.js"></script>

<script type="text/javascript">

$(document).ready(function()
var options =
chart:
renderTo: 'container',
type: 'column',
marginRight: 130,
marginBottom: 25
,
title:
text: 'Doctor patients view',
x: -20 //center
,
subtitle:
text: '',
x: -20
,
xAxis:
categories: []
,
yAxis:
title:
text: 'Amount'
,
plotLines: [
value: 0,
width: 1,
color: '#808080'
]
,
tooltip:
formatter: function()
return '<b>'+ this.series.name +'</b><br/>'+
this.x +': '+ this.y;

,
legend:
layout: 'vertical',
align: 'right',
verticalAlign: 'top',
x: -10,
y: 100,
borderWidth: 0
,
series: []


$.getJSON("<?php echo site_url('chartBarData');?>", function(json)
options.xAxis.categories = json[0]['data'];
options.series[0] = json[1];
chart = new Highcharts.Chart(options);
);
);
</script>









share|improve this question

















  • 1





    Hi @Diasline, I have tested your data structure and chart options, and your code works correctly: jsfiddle.net/BlackLabel/txv0f5Lc The problem is not on the JS side.

    – ppotaczek
    Mar 23 at 3:40











  • You are right, I just tested online it works, it could not work on localhost. Thank you brothter.

    – Diasline
    Mar 24 at 17:29













0












0








0








As a beginner in learning highchart, I cannot find out why the chart cannot display in the view. My controller displays the json data properly but when I call the controller in the $.getJSON to display the data in the chart I got a blank page.



Can someone help me to make the chart display in the View ?



Thanks



My controller



public function chartBarData() 

$query1 = $this->model_admin->getBarCha1('2019-01-24','2019-01-25');
$category = array();
$category['name'] = 'Medico';

$series1 = array();
$series1['name'] = 'Paciente';


foreach ($query1 as $row)

$category['data'][] = $row->Medico;
$series1['data'][] = $row->Paciente;



$result = array();
array_push($result,$category);
array_push($result,$series1);


print json_encode($result, JSON_NUMERIC_CHECK);



print json_encode($result, JSON_NUMERIC_CHECK) result :



["name":"Medico","data":["baptiste prophete","JUAN ALBERTO SUERO","ADRIANA MATEO","RAUL ARISTY COMAS","VICTORIA LILA FRANCO","IVANHOE LINARES VENTURA"],"name":"Paciente","data":[2,3,15,13,1,6]]


The view



<div id="container" style="min-width: 310px; height: 400px; max-width: 600px; margin: 0 auto"></div>
<script src="https://code.highcharts.com/highcharts.js"></script>
<script src="https://code.highcharts.com/modules/exporting.js"></script>
<script src="https://code.highcharts.com/modules/export-data.js"></script>

<script type="text/javascript">

$(document).ready(function()
var options =
chart:
renderTo: 'container',
type: 'column',
marginRight: 130,
marginBottom: 25
,
title:
text: 'Doctor patients view',
x: -20 //center
,
subtitle:
text: '',
x: -20
,
xAxis:
categories: []
,
yAxis:
title:
text: 'Amount'
,
plotLines: [
value: 0,
width: 1,
color: '#808080'
]
,
tooltip:
formatter: function()
return '<b>'+ this.series.name +'</b><br/>'+
this.x +': '+ this.y;

,
legend:
layout: 'vertical',
align: 'right',
verticalAlign: 'top',
x: -10,
y: 100,
borderWidth: 0
,
series: []


$.getJSON("<?php echo site_url('chartBarData');?>", function(json)
options.xAxis.categories = json[0]['data'];
options.series[0] = json[1];
chart = new Highcharts.Chart(options);
);
);
</script>









share|improve this question














As a beginner in learning highchart, I cannot find out why the chart cannot display in the view. My controller displays the json data properly but when I call the controller in the $.getJSON to display the data in the chart I got a blank page.



Can someone help me to make the chart display in the View ?



Thanks



My controller



public function chartBarData() 

$query1 = $this->model_admin->getBarCha1('2019-01-24','2019-01-25');
$category = array();
$category['name'] = 'Medico';

$series1 = array();
$series1['name'] = 'Paciente';


foreach ($query1 as $row)

$category['data'][] = $row->Medico;
$series1['data'][] = $row->Paciente;



$result = array();
array_push($result,$category);
array_push($result,$series1);


print json_encode($result, JSON_NUMERIC_CHECK);



print json_encode($result, JSON_NUMERIC_CHECK) result :



["name":"Medico","data":["baptiste prophete","JUAN ALBERTO SUERO","ADRIANA MATEO","RAUL ARISTY COMAS","VICTORIA LILA FRANCO","IVANHOE LINARES VENTURA"],"name":"Paciente","data":[2,3,15,13,1,6]]


The view



<div id="container" style="min-width: 310px; height: 400px; max-width: 600px; margin: 0 auto"></div>
<script src="https://code.highcharts.com/highcharts.js"></script>
<script src="https://code.highcharts.com/modules/exporting.js"></script>
<script src="https://code.highcharts.com/modules/export-data.js"></script>

<script type="text/javascript">

$(document).ready(function()
var options =
chart:
renderTo: 'container',
type: 'column',
marginRight: 130,
marginBottom: 25
,
title:
text: 'Doctor patients view',
x: -20 //center
,
subtitle:
text: '',
x: -20
,
xAxis:
categories: []
,
yAxis:
title:
text: 'Amount'
,
plotLines: [
value: 0,
width: 1,
color: '#808080'
]
,
tooltip:
formatter: function()
return '<b>'+ this.series.name +'</b><br/>'+
this.x +': '+ this.y;

,
legend:
layout: 'vertical',
align: 'right',
verticalAlign: 'top',
x: -10,
y: 100,
borderWidth: 0
,
series: []


$.getJSON("<?php echo site_url('chartBarData');?>", function(json)
options.xAxis.categories = json[0]['data'];
options.series[0] = json[1];
chart = new Highcharts.Chart(options);
);
);
</script>






highcharts codeigniter-3






share|improve this question













share|improve this question











share|improve this question




share|improve this question










asked Mar 22 at 16:34









DiaslineDiasline

12810




12810







  • 1





    Hi @Diasline, I have tested your data structure and chart options, and your code works correctly: jsfiddle.net/BlackLabel/txv0f5Lc The problem is not on the JS side.

    – ppotaczek
    Mar 23 at 3:40











  • You are right, I just tested online it works, it could not work on localhost. Thank you brothter.

    – Diasline
    Mar 24 at 17:29












  • 1





    Hi @Diasline, I have tested your data structure and chart options, and your code works correctly: jsfiddle.net/BlackLabel/txv0f5Lc The problem is not on the JS side.

    – ppotaczek
    Mar 23 at 3:40











  • You are right, I just tested online it works, it could not work on localhost. Thank you brothter.

    – Diasline
    Mar 24 at 17:29







1




1





Hi @Diasline, I have tested your data structure and chart options, and your code works correctly: jsfiddle.net/BlackLabel/txv0f5Lc The problem is not on the JS side.

– ppotaczek
Mar 23 at 3:40





Hi @Diasline, I have tested your data structure and chart options, and your code works correctly: jsfiddle.net/BlackLabel/txv0f5Lc The problem is not on the JS side.

– ppotaczek
Mar 23 at 3:40













You are right, I just tested online it works, it could not work on localhost. Thank you brothter.

– Diasline
Mar 24 at 17:29





You are right, I just tested online it works, it could not work on localhost. Thank you brothter.

– Diasline
Mar 24 at 17:29












0






active

oldest

votes












Your Answer






StackExchange.ifUsing("editor", function ()
StackExchange.using("externalEditor", function ()
StackExchange.using("snippets", function ()
StackExchange.snippets.init();
);
);
, "code-snippets");

StackExchange.ready(function()
var channelOptions =
tags: "".split(" "),
id: "1"
;
initTagRenderer("".split(" "), "".split(" "), channelOptions);

StackExchange.using("externalEditor", function()
// Have to fire editor after snippets, if snippets enabled
if (StackExchange.settings.snippets.snippetsEnabled)
StackExchange.using("snippets", function()
createEditor();
);

else
createEditor();

);

function createEditor()
StackExchange.prepareEditor(
heartbeatType: 'answer',
autoActivateHeartbeat: false,
convertImagesToLinks: true,
noModals: true,
showLowRepImageUploadWarning: true,
reputationToPostImages: 10,
bindNavPrevention: true,
postfix: "",
imageUploader:
brandingHtml: "Powered by u003ca class="icon-imgur-white" href="https://imgur.com/"u003eu003c/au003e",
contentPolicyHtml: "User contributions licensed under u003ca href="https://creativecommons.org/licenses/by-sa/3.0/"u003ecc by-sa 3.0 with attribution requiredu003c/au003e u003ca href="https://stackoverflow.com/legal/content-policy"u003e(content policy)u003c/au003e",
allowUrls: true
,
onDemand: true,
discardSelector: ".discard-answer"
,immediatelyShowMarkdownHelp:true
);



);













draft saved

draft discarded


















StackExchange.ready(
function ()
StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fstackoverflow.com%2fquestions%2f55304093%2fhighchart-shows-blank-page-using-codeigniter%23new-answer', 'question_page');

);

Post as a guest















Required, but never shown

























0






active

oldest

votes








0






active

oldest

votes









active

oldest

votes






active

oldest

votes















draft saved

draft discarded
















































Thanks for contributing an answer to Stack Overflow!


  • Please be sure to answer the question. Provide details and share your research!

But avoid


  • Asking for help, clarification, or responding to other answers.

  • Making statements based on opinion; back them up with references or personal experience.

To learn more, see our tips on writing great answers.




draft saved


draft discarded














StackExchange.ready(
function ()
StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fstackoverflow.com%2fquestions%2f55304093%2fhighchart-shows-blank-page-using-codeigniter%23new-answer', 'question_page');

);

Post as a guest















Required, but never shown





















































Required, but never shown














Required, but never shown












Required, but never shown







Required, but never shown

































Required, but never shown














Required, but never shown












Required, but never shown







Required, but never shown







Popular posts from this blog

SQL error code 1064 with creating Laravel foreign keysForeign key constraints: When to use ON UPDATE and ON DELETEDropping column with foreign key Laravel error: General error: 1025 Error on renameLaravel SQL Can't create tableLaravel Migration foreign key errorLaravel php artisan migrate:refresh giving a syntax errorSQLSTATE[42S01]: Base table or view already exists or Base table or view already exists: 1050 Tableerror in migrating laravel file to xampp serverSyntax error or access violation: 1064:syntax to use near 'unsigned not null, modelName varchar(191) not null, title varchar(191) not nLaravel cannot create new table field in mysqlLaravel 5.7:Last migration creates table but is not registered in the migration table

용인 삼성생명 블루밍스 목차 통계 역대 감독 선수단 응원단 경기장 같이 보기 외부 링크 둘러보기 메뉴samsungblueminx.comeh선수 명단용인 삼성생명 블루밍스용인 삼성생명 블루밍스ehsamsungblueminx.comeheheheh

155 수학 과학 기타 둘러보기 메뉴eh추가해eh문서를 완성해