Saltar al contenido
View in the app

A better way to browse. Learn more.

Ayuda Excel

A full-screen app on your home screen with push notifications, badges and more.

To install this app on iOS and iPadOS
  1. Tap the Share icon in Safari
  2. Scroll the menu and tap Add to Home Screen.
  3. Tap Add in the top-right corner.
To install this app on Android
  1. Tap the 3-dot menu (⋮) in the top-right corner of the browser.
  2. Tap Add to Home screen or Install app.
  3. Confirm by tapping Install.

Formato de leyenda de un gráfico

publicado

Hola hola:

En el gráfico que adjunto se puede ver la leyenda en la parte inferior. Mi objetivo es colocarla en la parte izquierda y sin superponer con el gráfico.

He utilizado el siguiente código, que se encuentra dentro de una macro bastante más grande:


'Para ubicar la leyenda a la izquierda
ActiveChart.Legend.Position = xlLeft
'Para evitar la superposición de la leyenda con el gráfico
ActiveChart.Legend.IncludeInLayout = True[/CODE]

Este código funciona perfectamente en cualquier gráfico nuevo, pero en éste la leyenda se sigue superponiendo.

Adjunto archivo.

Gracias

grafico-proper.rar

Featured Replies

publicado

Sergio

Todo depende del tamaño de la gráfica y del area del grafico (su ancho), basado en tu ejemplo puedes probar con


With ActiveChart
With .PlotArea
.InsideWidth = 150
.InsideLeft = 350
End With
.Legend.Position = xlLegendPositionLeft
End With
[/PHP]

La gráfica queda así

Saludos

post-9328-145877013359_thumb.png

publicado
[uSER=9328]@Gerson Pineda[/uSER], he estado probando el código y no funciona bien. El resto de la macro hace más modificaciones en el gráfico y no sé exactamente qué es lo que afecta al tamaño.

Prueba re-dimensionar según el tamaño

With ActiveChart
With .ChartArea
vh = .Height
vl = .Left
vt = .Top
vw = .Width
End With
With .PlotArea
.InsideHeight = vh - 150
.InsideLeft = vl + 150
.InsideTop = vt + 30
.InsideWidth = vw - 150
End With
.Legend.Position = xlLegendPositionLeft
End With[/PHP]

Saludos

Archivado

Este tema está ahora archivado y está cerrado a más respuestas.

Configure browser push notifications

Chrome (Android)
  1. Tap the lock icon next to the address bar.
  2. Tap Permissions → Notifications.
  3. Adjust your preference.
Chrome (Desktop)
  1. Click the padlock icon in the address bar.
  2. Select Site settings.
  3. Find Notifications and adjust your preference.