diff --git a/src/hooks/useLegendProcessor.ts b/src/hooks/useLegendProcessor.ts index e2ee48ee..58aedc08 100644 --- a/src/hooks/useLegendProcessor.ts +++ b/src/hooks/useLegendProcessor.ts @@ -17,6 +17,10 @@ import { LegendOptions } from "@/types/dashboard"; export default function useLegendProcess(legend?: LegendOptions) { + let isRight = false; + if (legend && legend.toTheRight) { + isRight = true; + } function showEchartsLegend(keys: string[]) { if (legend && !legend.show === undefined) { return legend.show; @@ -29,11 +33,6 @@ export default function useLegendProcess(legend?: LegendOptions) { } return true; } - function isRight() { - if (legend && legend.toTheRight) { - return true; - } - return false; - } + return { showEchartsLegend, isRight }; } diff --git a/src/views/dashboard/graphs/Bar.vue b/src/views/dashboard/graphs/Bar.vue index 48efdf92..a3627e80 100644 --- a/src/views/dashboard/graphs/Bar.vue +++ b/src/views/dashboard/graphs/Bar.vue @@ -13,7 +13,7 @@ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License. -->