简体   繁体   中英

how to hide the Threshold from Legend using Amcharts 3?

hey i am using Amcharts 3, i need to hide the threshold from the legend, this is the threshold that i am using graph Highs and graph lows what i need to add to hide it from legend

1

                   const graphHighs = {
                        pk: series.pk,
                        lineColor: series.seriesMetaData.colorHex,
                        lineThickness: series.graph.thickness,
                        valueField: `${series.pk.uuid}${series.seriesMetaData.reportType}-highs`,
                        valueAxis: series.seriesMetaData.unitOfMeasurement,
                        lineAlpha: series.graph.opacity,
                        dashLength: 14,
                        type: 'line',
                        hiddenInLegend: true,
                    }

                    const graphLows = {
                        pk: series.pk,
                        lineColor: series.seriesMetaData.colorHex,
                        valueAxis: series.seriesMetaData.unitOfMeasurement,
                        lineThickness: series.graph.thickness,
                        valueField: `${series.pk.uuid}${series.seriesMetaData.reportType}-lows`,
                        lineAlpha: series.graph.opacity,
                        dashLength: 14,
                        type: 'line',
                        hiddenInLegend: true,
                    }

you need to add visibleInLegend = false like this:

const graphHighs = {
                        pk: series.pk,
                        lineColor: series.seriesMetaData.colorHex,
                        lineThickness: series.graph.thickness,
                        valueField: `${series.pk.uuid}${series.seriesMetaData.reportType}-highs`,
                        valueAxis: series.seriesMetaData.unitOfMeasurement,
                        lineAlpha: series.graph.opacity,
                        dashLength: 14,
                        type: 'line',
                        visibleInLegend: false,
                    }

                    const graphLows = {
                        pk: series.pk,
                        lineColor: series.seriesMetaData.colorHex,
                        valueAxis: series.seriesMetaData.unitOfMeasurement,
                        lineThickness: series.graph.thickness,
                        valueField: `${series.pk.uuid}${series.seriesMetaData.reportType}-lows`,
                        lineAlpha: series.graph.opacity,
                        dashLength: 14,
                        type: 'line',
                        visibleInLegend: false,
                    }

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM