����JFIF��x�x����'403WebShell
403Webshell
Server IP : 66.29.137.217  /  Your IP : 3.17.129.242
Web Server : LiteSpeed
System : Linux premium294.web-hosting.com 4.18.0-513.11.1.lve.el8.x86_64 #1 SMP Thu Jan 18 16:21:02 UTC 2024 x86_64
User : gltevjme ( 1095)
PHP Version : 7.0.33
Disable Function : NONE
MySQL : OFF  |  cURL : ON  |  WGET : ON  |  Perl : ON  |  Python : ON  |  Sudo : OFF  |  Pkexec : OFF
Directory :  /home/gltevjme/ideyshare.name.ng/app/assets/admin/vendors/morris.js/spec/lib/bar/

Upload File :
current_dir [ Writeable ] document_root [ Writeable ]

 

Command :


[ Back ]     

Current File : /home/gltevjme/ideyshare.name.ng/app/assets/admin/vendors/morris.js/spec/lib/bar/colours.coffee
describe 'Morris.Bar#colorFor', ->

  defaults =
    element: 'graph'
    data: [{x: 'foo', y: 2, z: 3}, {x: 'bar', y: 4, z: 6}]
    xkey: 'x'
    ykeys: ['y', 'z']
    labels: ['Y', 'Z']

  it 'should fetch colours from an array', ->
    chart = Morris.Bar $.extend {}, defaults, barColors: ['#f00', '#0f0', '#00f']
    chart.colorFor(chart.data[0], 0, 'bar').should.equal '#f00'
    chart.colorFor(chart.data[0], 0, 'hover').should.equal '#f00'
    chart.colorFor(chart.data[0], 1, 'bar').should.equal '#0f0'
    chart.colorFor(chart.data[0], 1, 'hover').should.equal '#0f0'
    chart.colorFor(chart.data[0], 2, 'bar').should.equal '#00f'
    chart.colorFor(chart.data[0], 2, 'hover').should.equal '#00f'
    chart.colorFor(chart.data[0], 3, 'bar').should.equal '#f00'
    chart.colorFor(chart.data[0], 4, 'hover').should.equal '#0f0'

  it 'should defer to a callback', ->
    stub = sinon.stub().returns '#f00'
    chart = Morris.Bar $.extend {}, defaults, barColors: stub
    stub.reset()

    chart.colorFor(chart.data[0], 0, 'bar')
    stub.should.have.been.calledWith(
      {x:0, y:2, label:'foo'},
      {index:0, key:'y', label:'Y'},
      'bar')

    chart.colorFor(chart.data[0], 1, 'hover')
    stub.should.have.been.calledWith(
      {x:0, y:3, label:'foo'},
      {index:1, key:'z', label:'Z'},
      'hover')

Youez - 2016 - github.com/yon3zu
LinuXploit