Incorporating external jquery library
If you are trying to add a js library from an external cdn in drupal 8 then, in your theme/module mycustom.libraries.yml file add do like this:

NOTE: Make sure you indent each spaces with two spacebar press button and not a tab press.

NOTE: version is optional here. You may not need add in.

mycustom.flexslider:
  version: 2.6.3
  css:
    theme:
      //cdnjs.cloudflare.com/ajax/libs/flexslider/2.6.3/flexslider.css: {type: external}
  js:
    //cdnjs.cloudflare.com/ajax/libs/flexslider/2.6.3/flexslider.min.css: {type: external}
  dependencies:
    - core/jquery


If you are hosting it within your module or theme then:

NOTE: Here I placed flexslider within my theme or module vendor directory. So it would be inside mycustom/vendor/flexslider

mycustom.flexslider:
  version: 2.6.3
  css:
    theme:
      vendor/flexslider/flexslider.css: {}
  js:
    vendor/flexslider/jquery.flexslider-min.js: {}
  dependencies:
    - core/jquery


If you are just trying to host your custom js or css file then:

mycustom.myscript:
  js:
    js/script.js: {}


If its dependent on other library like core jquery or custom library then:

mycustom.myscript:
  js:
    js/script.js: {}
  dependencies:
   - core/jquery
   - mycustom.myscript2


Then like in example module If I had to add flexslider library:

public function getFlexSliderImplementation() {

    $build['myelement'] = array(
      '#theme' =&gt; 'js_flexslider',
    );
    // Add our script. It is tiny, but this demonstrates how to add it. We pass
    // our module name followed by the internal library name declared in
    // libraries yml file.
    $build['myelement']['#attached']['library'][] = 'mycustom/mycustom.flexslider';
    // Return the renderable array.
    return $build;
  }


Update:
Download and extract Flotr2 to your module or theme vendor directory. Modify libraries.yml file to include flotr2

js_example.flotr2:
 js:
   vendor/flotr2/flotr2.min.js : {}

js_example.sdashboard:
  css:
    component:
      vendor/sDashboard/sDashboard.css: {}
  js:
    vendor/sDashboard/jquery-sDashboard.js : {}
  dependencies:
    - core/jquery
    - core/jquery.ui
    - core/jquery.datatables
    - js_example/js_example.flotr2