Long-Term Debt - Additional Information (Details) - USD ($) | May 14, 2018 | Sep. 28, 2016 | Sep. 30, 2016 | Jun. 30, 2018 | Jun. 30, 2017 | Jun. 30, 2018 | Jun. 30, 2017 | Oct. 31, 2018 |
Debt Instrument [Line Items] | | | | | | | | |
Interest expense on borrowings | | | | $ 186,000 | $ 162,000 | $ 346,000 | $ 317,000 | |
Accretion of scheduled final payment | | | | 11,000 | 53,000 | 60,000 | 105,000 | |
Accretion of deferred debt issuance costs | | | | 9,000 | $ 53,000 | 23,000 | $ 105,000 | |
Second Amended and Restated Loan and Security Agreement | | | | | | | | |
Debt Instrument [Line Items] | | | | | | | | |
Long term debt | | | | 10,000,000 | | $ 10,000,000 | | |
Silicon Valley Bank, MidCap Funding XII Trust and MidCap Financial Trust | First Amended and Restated Loan and Security Agreement | | | | | | | | |
Debt Instrument [Line Items] | | | | | | | | |
Interest rate | | | 0.50% | | | | | |
Debt instrument, description of variable rate basis | | | | | | 30-day U.S. LIBOR | | |
Line of credit facility, maximum borrowing capacity | | | $ 15,000,000 | | | | | |
Long term debt | | $ 8,000,000 | | | | | | |
Line of credit facility, remaining borrowing capacity | | | | 7,000,000 | | $ 7,000,000 | | |
Debt Instrument, Payment Terms | | | | | | The Company was required to pay accrued interest only on the outstanding $8.0 million balance through December 31, 2017, followed by 30 equal payments of principal and accrued interest. | | |
Final payment during maturity | | | | $ 500,000 | | $ 500,000 | | |
Debt instrument, maturity date | | | | | | Jun. 1, 2020 | | |
Repay all the amount outstanding under the loan agreement including fees | | $ 5,300,000 | | | | | | |
Silicon Valley Bank, MidCap Funding XII Trust and MidCap Financial Trust | First Amended and Restated Loan and Security Agreement | Final Payment | | | | | | | | |
Debt Instrument [Line Items] | | | | | | | | |
Repay all the amount outstanding under the loan agreement including fees | $ 7,000,000 | | | | | | | |
Silicon Valley Bank, MidCap Funding XII Trust and MidCap Financial Trust | First Amended and Restated Loan and Security Agreement | Prepayments Through May 31, 2020 | | | | | | | | |
Debt Instrument [Line Items] | | | | | | | | |
Prepayment fee percentage of the original principal amount of the aggregate term loans | | | 2.00% | | | | | |
Silicon Valley Bank, MidCap Funding XII Trust and MidCap Financial Trust | Floating Interest Rate | First Amended and Restated Loan and Security Agreement | | | | | | | | |
Debt Instrument [Line Items] | | | | | | | | |
Interest rate | | | 7.00% | | | | | |
Silicon Valley Bank, MidCap Funding III Trust and MidCap Financial Trust | Second Amended and Restated Loan and Security Agreement | | | | | | | | |
Debt Instrument [Line Items] | | | | | | | | |
Interest rate | 1.89% | | | | | | | |
Debt instrument, description of variable rate basis | | | | | | 30-day U.S. LIBOR | | |
Line of credit facility, maximum borrowing capacity | $ 20,000,000 | | | | | | | |
Long term debt | 10,000,000 | | | | | | | |
Debt instrument, maturity date | | | | | | Oct. 1, 2022 | | |
Final payment during maturity, percentage | | | | | | 5.50% | | |
Silicon Valley Bank, MidCap Funding III Trust and MidCap Financial Trust | Second Amended and Restated Loan and Security Agreement | Term B Loan | | | | | | | | |
Debt Instrument [Line Items] | | | | | | | | |
Line of credit facility, remaining borrowing capacity | | | | | | | | $ 5,000,000 |
Silicon Valley Bank, MidCap Funding III Trust and MidCap Financial Trust | Second Amended and Restated Loan and Security Agreement | Term C Loan | | | | | | | | |
Debt Instrument [Line Items] | | | | | | | | |
Line of credit facility, remaining borrowing capacity | | | | | | | | $ 5,000,000 |
Silicon Valley Bank, MidCap Funding III Trust and MidCap Financial Trust | Second Amended and Restated Loan and Security Agreement | Prepayment Prior the First Anniversary | | | | | | | | |
Debt Instrument [Line Items] | | | | | | | | |
Prepayment fee percentage of the original principal amount of the each term loan | | | | 3.00% | | 3.00% | | |
Silicon Valley Bank, MidCap Funding III Trust and MidCap Financial Trust | Second Amended and Restated Loan and Security Agreement | Prepayment on or After First Anniversary but Prior to October 1, 2022 | | | | | | | | |
Debt Instrument [Line Items] | | | | | | | | |
Prepayment fee percentage of the original principal amount of the each term loan | | | | 2.00% | | 2.00% | | |
Silicon Valley Bank, MidCap Funding III Trust and MidCap Financial Trust | First Amended and Restated Loan and Security Agreement, Initial Tranche | | | | | | | | |
Debt Instrument [Line Items] | | | | | | | | |
Long term debt | $ 10,000,000 | | | | | | | |
Silicon Valley Bank, MidCap Funding III Trust and MidCap Financial Trust | Floating Interest Rate | Second Amended and Restated Loan and Security Agreement | | | | | | | | |
Debt Instrument [Line Items] | | | | | | | | |
Interest rate | 6.50% | | | | | | | |