0

In my angular 6 project, I am using plotly.js-dist to generate duval triangle. I need to implement Duval Triangle for OLTC. I have the values for CH4, C2H2 and C2H4. in library I need to understand how to add the values to axis based on the given values.

var layout = {
title: 'Testing',
ternary: {
    sum: 100,
    aaxis: this.makeAxis('Methane'),
    baxis: this.makeAxis('Acetylene'),
    caxis: this.makeAxis('Ethylene')
},
annotations: [
    {
        //plot title
        showarrow: false,
        text: 'Duval Triangle',
        x: 0.15,
        y: 1.1
    },
    {
        //ethylene arrow
        showarrow: true,
        text: '%C2H4',
        x: 0.8,
        y: 0.48,
        ax: -25,
        ay: -35,
        textangle: 60
    },
    {
        //acetylene arrow
        showarrow: true,
        text: '%C2H2',
        x: 0.46,
        y: -0.15,
        ax: 40,
        ay: 0
    },
    {
        //methane arrow
        showarrow: true,
        text: '%CH4',
        x: 0.26,
        y: 0.58,
        ax: -25,
        ay: 35,
        textangle: -60
    },
    {
        //d1
        showarrow: false,
        text: 'D1',
        font: { size: 20 },
        x: ,
        y: 
    },
    {
        //d2
        showarrow: false,
        text: 'D2',
        font: { size: 20 },
        x:,
        y: 
    },
    {
        //dt
        showarrow: false,
        text: 'DT',
        font: { size: 20 },
        x: ,
        y:
    },
    {
        //t3
        showarrow: false,
        text: 'T3',
        font: { size: 20 },
        x: ,
        y: 
    },
    {
        //t2
        showarrow: true,
        text: 'T2',
        font: { size: 20 },
        x: ,
        y: ,
    },
    {
        //t1
        showarrow: true,
        text: 'T1',
        font: { size: 20 },
        x:,
        y: ,
        ax: ,
        ay: 
    },
    {
        //pd
        showarrow: true,
        text: 'PD',
        font: { size: 20 },
        x: 6,
        y: ,
        ax: ,
        ay: 
    }
]

};

Here is te image where I taken the values,

enter image description here

enter image description here

what will the values inside the annotations ?

0 Answers0