Jump to content
JChartFX Community
  • 0

TypeError: chart1.getAnimations(...).getLoad is not a function


Groover

Question

 Hi,

 any ideas why this is not working?  jchartfx.full.js is included!

Thanks!

 

 

 

 

 

 

<!DOCTYPE html>
<html xmlns="http://www.w3.org/1999/xhtml"><head><meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
<head>
    <title>jChartFX using JQueryUI</title>
    <link type="text/css" href="http://www.jchartfx.com/styles/css/jquery-ui-1.8.18.custom.css"
        rel="Stylesheet" />
    <link type="text/css" href="http://www.jchartfx.com/resources/Include/cupertino/jquery-ui-1.8.21.custom.css"
        rel="Stylesheet" />
    <script type="text/javascript" src="http://www.jchartfx.com/scripts/jquery-1.7.1.js"></script>
    <script type="text/javascript" src="http://www.jchartfx.com/scripts/jquery-ui-1.8.18.custom.min.js"></script>
    <script type="text/javascript" src="http://www.jchartfx.com/jChartFX/7.0.4728.16930/jchartfx.full.js"></script>
    <script type="text/javascript" src="js/jchartfx.animation.js"></script>
    <script type="text/javascript" src="http://www.jchartfx.com/scripts/jquery.json-1.3.min.js"></script>
</head>
<body>
<div id="div_Chart" style="height:400px;width:500px;display:inline-block"/>
<script language = "javascript" type = "text/javascript">
var td;
td = new cfx.TitleDockable();
td.setText("Alerts Per Host");
var chart1 =new cfx.Chart();
chart1.getAnimations().getLoad().setEnabled(true);
chart1.getTitles().add(td);
chart1.getLegendBox().setVisible(true);

chart1.setGallery(cfx.Gallery.Pie);
chart1.getAllSeries().getPointLabels().setVisible(true);
chart1.getView3D().setEnabled(true);
var myPie;
myPie = (chart1.getGalleryAttributes());
myPie.setExplodingMode(cfx.ExplodingMode.First);
myPie.setSliceSeparation(20);

var items = [{
    "Label": "Nuts",
    "Value": 10
}, {
    "Label": "Veggies",
    "Value": 40
}, {
    "Label": "Fruit",
    "Value": 10
}, {
    "Label": "Diary",
    "Value": 15
}, {
    "Label": "Grains",
    "Value": 25
}];
chart1.setDataSource(items);
chart1.create(document.getElementById('div_Chart'))</script>
</body>
</html>

Link to comment
Share on other sites

2 answers to this question

Recommended Posts

  • 0

 You have a reference in your code to jChartFX version 7.0.4728.16930/jchartfx.full.js, but the Animations feature was release on JChartFX version 7.1


The order importing JChartFX libraries is important. We use jchartfx.full.js to ease the deployment process but it is always recommended to upload JChartFX libraries on demand as needed.


I tried your code using this reference:


<script type="text/javascript" src="'>http://www.jchartfx.com/libs/v7/current/js/jchartfx.full.js"></script>


and it worked as expected.

Attachments.zip

Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Guest
Answer this question...

×   Pasted as rich text.   Paste as plain text instead

  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...