小编Raj*_*Raj的帖子

在ChartJs中的Linechart点内添加图像

我正在使用ChartJs开发一个项目.我试图在里面添加图标图像line chart而不是points.

我附上了一张图片,其中我展示了上述要求.在该图像中,有一个ChartJs图像和一个参考图像.我想在ChartJs的折线图中添加一个与参考图像(太阳和云图标)完全相同的图像.

图表示例

ChartJs有可能吗?

javascript jquery data-visualization linechart chart.js

13
推荐指数
1
解决办法
7221
查看次数

单击线图中的单个点而不是条形图中的单个条中显示的引导模式

我想在图表js中单击单个条而不是工具提示时显示引导模式.

我已经编写了代码,用于在单击折线图中的特定x值时显示引导模式.但是当我使用相同的数据集将linecchart更改为barchart时,它不适用于条形图.据我所知,差异b/w线图和条形图是图形表示和可视化.如果错了,请更正.

图像文件 :

我在上面解释的输出屏幕截图

HTML:

<div class="chart1">
    <canvas id="chart" width="300" height="150"></canvas>
</div>

<!-- Modal -->
  <div class="modal fade" id="myModal" tabindex="-1" role="dialog" aria-labelledby="myModalLabel">
    <div class="modal-dialog" role="document">
      <div class="modal-content">
        <div class="modal-header">
          <button type="button" class="close" data-dismiss="modal" aria-label="Close"><span aria-hidden="true">&times;</span></button>
          <h4 class="modal-title" id="myModalLabel">Modal title</h4>
        </div>
        <div class="modal-body">
         You clicked in June
       </div>
       <div class="modal-footer">
        <button type="button" class="btn btn-default" data-dismiss="modal">Close</button>
        <button type="button" class="btn btn-primary">Save changes</button>
      </div>
    </div>
  </div>
</div>

<div class="modal fade" id="myModal1" tabindex="-1" role="dialog" aria-labelledby="myModalLabel">
  <div class="modal-dialog" role="document">
    <div class="modal-content">
      <div class="modal-header">
        <button type="button" …
Run Code Online (Sandbox Code Playgroud)

html javascript twitter-bootstrap chart.js

7
推荐指数
1
解决办法
437
查看次数

CSS动画在wow js中无法正常工作

我已经为我的项目集成了wow.js,我遇到了动画问题.

我用来为div设置动画的动画类只有在我将animate.css中的css类作为嵌入式样式表粘贴到我的页面时才会起作用,即使我在数据中给出延迟,div也会显示-wow-delay =" 5s"和动画在5秒后正常工作.如果有人知道为什么会发生这种情况,Plz会帮助我.

这是我的代码..

HTML:

  <div class="cssAnimation hidediv">
    <div class="dial1 wow slideInLeft " data-wow-duration="2s" data-wow-delay="5s">
        Anmation goes here 1
    </div>
</div>
Run Code Online (Sandbox Code Playgroud)

CSS:

  <style type="text/css">

.dial1{
    width:200px;
    height: 100px;
    display: block;
    position: absolute;
    background: #000;
    color:#fff;
    padding: 10px;
    right: 0;
    z-index: 9999;
}

.dial2{
    width:200px;
    height: 100px;
    display: block;
    position: absolute;
    background: #000;
    color:#fff;
    padding: 10px;
    right: 210px;
}


.hidediv{
 -webkit-animation: hide 2s forwards;
 -webkit-animation-iteration-count: 1;
 -webkit-animation-delay: 5s;
 animation: hide 2s forwards;
 animation-iteration-count: 1;
 animation-delay:  5s;
}

@-webkit-keyframes hide { …
Run Code Online (Sandbox Code Playgroud)

html css css-transitions animate.css wow.js

6
推荐指数
1
解决办法
1912
查看次数

在jquery bootstrap数据表中显示NaN到NaN

我已经在bootstrap框架中集成了jquerydatatable,当我选择All时,它显示为这样

显示NaN到NaN共有7个条目.

使用Javascript

$(function () {


    $('#example2').DataTable({
        "lengthMenu": [5, 10, 50, "All"]
    });

});
Run Code Online (Sandbox Code Playgroud)

javascript datatables twitter-bootstrap

6
推荐指数
1
解决办法
1152
查看次数

Angular Js ui.bootstrap选项卡自定义

我在我的项目中使用angular js ui.bootstrap,我想使用ui bootstrap添加标签.我正在使用ui.bootstrap指令作为标签.但是这个有角度的ui bootstrap标签里面没有ul li内容.

<uib-tabset active="active">
     <uib-tab index="0" heading="Static title 1">Static content 1</uib-tab>
     <uib-tab index="0" heading="Static title 2">Static content 2</uib-tab>
     <uib-tab index="0" heading="Static title 3">Static content 3</uib-tab>
</uib-tabset>
Run Code Online (Sandbox Code Playgroud)

我想在标签中的标签内添加span标签.这是我想要的输出.

<li ng-class="{active: active, disabled: disabled}" index="0" heading="Static title 1" class="ng-isolate-scope active">
   <a href="" ng-click="select()" uib-tab-heading-transclude="" class="ng-binding">
    <span class="badge">5</span>Static title 1
   </a>
</li>
Run Code Online (Sandbox Code Playgroud)

如果有人知道如何做到这一点,请帮我找出解决方案.

提前致谢.

javascript jquery twitter-bootstrap angularjs angular-ui-bootstrap

6
推荐指数
1
解决办法
852
查看次数

使用Angular js嵌入Html页面

我是Angular js的新手,我正试图在bootstrap模板的帮助下使用Angular js在html页面中嵌入html片段.

这是我的index.html

<body >
  <div ng-app="">
     <div ng-include="mainmenu.html"></div>


       <!-- Page Content -->
          <div class="container">

         <div class="row">
            <div class="col-lg-12 text-center">
               <h1>Starter Template</h1>
                <p class="lead">Complete with pre-defined file paths that you won't have to change!</p>

           </div>
         </div>
    <!-- /.row -->

    </div>
<!-- /.container -->
 </div>
  <!-- jQuery Version 1.11.1 -->
  <script src="js/jquery.js"></script>

  <!-- Bootstrap Core JavaScript -->
  <script src="js/bootstrap.min.js"></script>
  <script  src="http://ajax.googleapis.com/ajax/libs/angularjs/1.4.8/angular.min.js"></script>
</body>
Run Code Online (Sandbox Code Playgroud)

这是我的manimenu.html

<!-- Navigation -->
<nav class="navbar navbar-inverse navbar-fixed-top" role="navigation">
    <div class="container">
        <!-- Brand and toggle get grouped for …
Run Code Online (Sandbox Code Playgroud)

html javascript jquery twitter-bootstrap angularjs

5
推荐指数
2
解决办法
518
查看次数

AngularJS Codeigniter base_url路径设置

我正在使用Codeigniter 3和AngularJs创建一个网站.虽然delevolping我在codeigniter中遇到了基本URL的一些问题.我附加了我的目录struture的图像文件.

在此输入图像描述

在我的主页(views/home.php)中,我添加了一个用于加载不同页面的ng-view.在这里,我使用angularjs ngRoute进行路由.

这是我的代码.

 var myApp = angular.module("myApp",["ui.bootstrap","ui.router","ngRoute"]);
 myApp.config(function($routeProvider) {
   $routeProvider
   .when("/", {
    templateUrl : "application/pages/mainpage.php"
    })
   .when("/about", {
    templateUrl : "application/pages/about.html"
    })
   .when("/services", {
    templateUrl : "application/pages/services.html"
    })
   .otherwise("/",{
    templateUrl:  "application/pages/mainpage.php"
   });
 });
Run Code Online (Sandbox Code Playgroud)

在mainpage.php里面,我列出了一些驻留在json文件(datas/data.json)中的配置文件内容(虚拟内容).所有内容都列出了.在这个列表中,我放置了一个按钮,其中ng-click ="myName"

这是代码:

  <div class="container" ng-controller="ListController">

<div class="row">
    <div class="col-lg-12 text-center">
        <h1>Starter Template</h1>
        <p class="lead">Complete with pre-defined file paths that you won't have to change</p>

        <div class="row">
            <div class="col-sm-6 col-md-4 wow zoomIn" data-wow-delay="0.5s" ng-repeat="items in artists">
                <div class="thumbnail">
                    <img ng-src="{{settings.base_url}}/application/assets/images/profile/{{items.shortname}}.jpg" alt="...">

                    <div class="caption">
                        <h3>{{items.name}}</h3>
                        <p>{{items.bio}}</p> …
Run Code Online (Sandbox Code Playgroud)

url angularjs codeigniter-3 angularjs-routing twitter-bootstrap-3

5
推荐指数
1
解决办法
901
查看次数

如何禁用除jquery datepicker中选定日期之外的所有其他日期

我有两个名为startdate和enddate的日期选择器.我想禁用除startdate中所选日期之外的所有其他日期.例如,如果我从startdate datepicker选择15/12/2016,那么我想在enddate datepicker中禁用除第15天之外的所有其他日期.

Demofiddle:https://jsfiddle.net/d7vzxn8s/

这是我的代码:

 <p>Start Date: <input type="text" id="startdate"></p>
 <p>End Date: <input type="text" id="enddate"></p>

 <script>
   $("#startdate").datepicker({
    onSelect: function (selected) {
        var dt = new Date(selected);
        dt.setDate(dt.getDate());
        $("#enddate").datepicker("option", "minDate", dt);
      }
    });
  $("#enddate").datepicker();
Run Code Online (Sandbox Code Playgroud)

javascript jquery jquery-ui date datepicker

5
推荐指数
1
解决办法
940
查看次数

如何在chart.js中的单个条中单击时显示Bootstrap模态

我正在使用chart.js开展项目.我想在图表js中单击单个条而不是工具提示时显示引导模式.现在我正在使用chart id的onclick函数来显示一个bootstrap模态.有没有办法让它变得可能.?

这是我的代码:

HTML:

   <div class="chart1">
     <canvas id="barchart5"></canvas>
   </div>

 <!-- Modal -->
<div class="modal fade" id="myModal" tabindex="-1" role="dialog" aria-labelledby="myModalLabel">
  <div class="modal-dialog" role="document">
    <div class="modal-content">
      <div class="modal-header">
        <button type="button" class="close" data-dismiss="modal" aria-label="Close"><span aria-hidden="true">&times;</span></button>
        <h4 class="modal-title" id="myModalLabel">Modal title</h4>
      </div>
      <div class="modal-body">
        ...
      </div>
      <div class="modal-footer">
        <button type="button" class="btn btn-default" data-dismiss="modal">Close</button>
        <button type="button" class="btn btn-primary">Save changes</button>
      </div>
    </div>
  </div>
</div>
Run Code Online (Sandbox Code Playgroud)

JAVASCRIPT:

 <script type="text/javascript">
   var data5 ={
   labels: ["Label1", "Label2", "Label3", "Label4", "Label5", "Label6", "Label7", "Label8"],
   datasets : [
   {
     fillColor : "#F64747",
     strokeColor …
Run Code Online (Sandbox Code Playgroud)

javascript jquery twitter-bootstrap bootstrap-modal chart.js

3
推荐指数
1
解决办法
3928
查看次数