Highcharts在AngularJs没有jQuery的? [英] Highcharts in AngularJs without jQuery?

查看:180
本文介绍了Highcharts在AngularJs没有jQuery的?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

是否有highcharts,你并不需要完整的jQuery的任何指令?这的似乎是最流行的时刻,但我不能让它没有jQuery的工作: https://github.com/pablojim/ highcharts-NG

Is there any directive for highcharts where you don't need the full jQuery? This ones seem's the most popular at the moment but I can't get it work without jQuery: https://github.com/pablojim/highcharts-ng

是否有可能写一个highcharts指令,只使用jQuery的简易版本中包含的角度?

Is it possible to write a highcharts directive and only using the light version of jQuery that is included with angular?

如果我必须包括完整的jQuery,是否会影响我的应用程序的加载时间/性能signifigantly?

If I do have to include the full jQuery, will it affect the loading time/performance of my app signifigantly?

推荐答案

这不是很难建立一个包装现有的JavaScript库指令。

It's not hard to build a directive that wraps the existing javascript library.

这是code的highchart指令。这是非常简单的。

This is code for a highchart directive. It's very simple.

app.directive("highcharts", function() {
  return {
    link: function(scope, el, attrs) {
      var options = scope.$eval(attrs.highcharts);
      options.chart.renderTo = el[0];
      new Highcharts.Chart(options);
    }
  };
})

完整的示例在这里。 http://plnkr.co/edit/iN8TAMKyHIyN4F44iJ0U?p=$p$pview

我的回答给您的是,如果你喜欢 https://github.com/pablojim/highcharts-ng

My answer to you is, if you like https://github.com/pablojim/highcharts-ng


  • 只是添加<一个href=\"https://rawgithub.com/highslide-software/highcharts.com/master/js/adapters/standalone-framework.src.js\"相对=nofollow>独立的框架,而不是完全的jQuery。

  • just add standalone-framework instead of full jQuery.

如果没有,像我一样:)
建立你自己喜欢提供的演示。它并不难。

if not, like me :), build your own like the demo provided. it's not that hard.

顺便说一句,这是 Highcharts介绍自己的独立的框架。

BTW, This is the page Highcharts introduces their standalone framework.

这篇关于Highcharts在AngularJs没有jQuery的?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆