Skip to content

Add labels to axis #82

@RosarioAleCali

Description

@RosarioAleCali

Hello everyone,
I am creating a 3D chart and I would like to add labels to the x, y, z-axis.
This is my code:

<Plot
    data={[
    {
        type: 'surface',
        x: data.x,
        y: data.y,
        z: data.z
    }
    ]}
    layout={
        {
             width: 800,
             height: 600,
             title: data.masterGraph.title,
             xaxis: {
                 title: data.masterGraph.xAxis,
                 titlefont: {
                     family: 'Courier New, monospace',
                     size: 18,
                     color: '#7f7f7f'
                 }
              },
              yaxis: {
                  title: data.masterGraph.yAxis,
                  titlefont: {
                      family: 'Courier New, monospace',
                      size: 18,
                      color: '#7f7f7f'
                   }
              },
              zaxis: {
                   title: data.masterGraph.zAxis,
                   titlefont: {
                       family: 'Courier New, monospace',
                       size: 18,
                       color: '#7f7f7f'
                     }
                   }
              }
    }
 />

where data is a JSON object. Everything seems to be working (chart title, type, and data) except for labeling the axis. Can anyone help with this?

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions