The important stuff is not so much the license you are using, but rather the license that the third-party library is using.
Assuming you have obtained the third-party library through legal means, then the license of that library determines what you can do with it and what conditions you must abide with if you want to distribute your combined program + library.
As the flot library uses the MIT license, you can freely use the library in your project. You only have to make sure that the license text is kept with the files from the flot library.
A different case arises if the third-party library uses a strong copyleft license, like the GPL.
Those licenses stipulate that they must apply to the entire product of program + libraries. This means that if you use a GPL library, then, for all practical purposes, you must also use the GPL for your own code. Technically, you can use a different, more permissive, license, but the GPL terms would still apply to the code, so there is not much point in doing so.