Jump to content

Pirep Chart problem


mark1million

Recommended Posts

  • Moderators

I am on the latest beta, but i copied the chart code from another template thats on my test server which has a different release on it, has the code changed at all?

This is how im using the chart,

<?php
/*
  Added in 2.0!
*/
$chart_width = '700';
$chart_height = '250';

/* Don't need to change anything below this here */
?>
<div align="center" style="width: 100%;">
  <div align="center" id="pireps_chart"></div>
</div>

<script type="text/javascript" src="<?php echo fileurl('/lib/js/ofc/js/swfobject.js')?>"></script>
<script type="text/javascript">
swfobject.embedSWF("<?php echo fileurl('/lib/js/ofc/open-flash-chart.swf');?>",
  "pireps_chart", "<?php echo $chart_width;?>", "<?php echo $chart_height;?>",
  "9.0.0", "expressInstall.swf",
  {"data-file":"<?php echo actionurl('/pilots/statsdaysdata/'.$userinfo->pilotid);?>"});
</script>

Link to comment
Share on other sites

  • Administrators

That code shouldn't have - is it passing the pilot id (if you view source and goto the url). Try loading that URL in the browser too. If you paste what that URL loads, it could be that my scaling algorithm has a bug in it (I have to manually do scaling)

Link to comment
Share on other sites

  • Moderators

Could this be it? noticed "min": 1, "max": 1,

{ "elements": [ { "type": "area", "width": 2, "dot-style": { "type": "solid-dot", "dot-size": 3, "halo-size": 1, "colour": "#3D5C56" }, "colour": "#3D5C56", "fill": "#3D5C56", "fill-alpha": 0.3, "on-show": { "type": "pop-up", "cascade": 2, "delay": 0.5 }, "text": "", "font-size": 10, "values": [ 1, 1 ] } ], "title": { "text": "Past 30 days PIREPs" }, "y_axis": { "min": 1, "max": 1, "steps": 1 }, "x_axis": { "labels": { "labels": [ "2010-02-21", "2010-02-23" ], "rotate": 270 } }, "bg_colour": "#FFFFFF" }

Link to comment
Share on other sites

  • 4 years later...

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

Loading...
×
×
  • Create New...