I'm using jChartFX for some charting requirements for my website, I'm using
<?php include $_SERVER["DOCUMENT_ROOT"].'/footer.php' ?>
to bring in a footer to the website which has a line of code in it of
<script type="text/javascript" src="/js/retina.js"></script>
Which for some reason is making the chart not show for jChartFX. I have been through the process of commenting out the various sections of footer in order to isolate this being the incompatibility.
Note: I've not included the full page code to save on space, but can reply with full code if required.
The chart is displayed through;
<div id="ChartDiv" style="width:600px;height:400px"></div> <script type="text/javascript" language="javascript">
var chart1;
function loadChart()
{
chart1 = new cfx.Chart();
<!-- chart1.getData().setSeries(2); -->
chart1.getData().setSeries(1);
chart1.getAxisY().setMin(100);
chart1.getAxisY().setMax(1000);
var series1 = chart1.getSeries().getItem(0);
<!-- var series2 = chart1.getSeries().getItem(1); -->
series1.setGallery(cfx.Gallery.Lines);
<!-- series2.setGallery(cfx.Gallery.Bar); -->
var data = <?php echo json_encode($temp, JSON_NUMERIC_CHECK); ?>;
chart1.setDataSource(data);
var divHolder = document.getElementById('ChartDiv');
chart1.create(divHolder);
}
To be honest, I'm at a complete loss so any / all help would be appreciated.
Thanks Maudise
I added retina.js to some of our jChartFX test pages and they displayed fine. There might be something else you are including in the page when you generate your footer.
I did not check too deep into retina.js but it seems to check for img tags and try to replace with retina counterparts and jChartFX does not use img tags.
Regards,
JuanC