如何从工具提示/标签中删除x轴索引

时间:2019-08-14 11:11:18

标签: primefaces jqplot

如何从条形图(1,)上删除该值我正在使用PrimeFaces,并且当鼠标悬停在条形图上时,jqPlot只想保留第二个值。

我已经尝试在Internet上搜索各种信息,但没有发现完全关于此自定义项的信息。通过下图,我可以更好地说明要从图表中的柱形图中删除的值。

https://ibb.co/8jSk4zP

function skinBarImpurezasMinerais() {
                this.cfg.shadow = false;
                this.cfg.title = '';
                //this.cfg.seriesColors = ['#e30910', '#FFC107'];
                this.cfg.grid = {
                    background: '#ffffff',
                    borderColor: '#ffffff',
                    gridLineColor: '#F5F5F5',
                    shadow: false
                };
                this.cfg.axesDefaults = {
                    borderWidth: 0.1,
                    borderColor: 'bdbdbd',
                    rendererOptions: {
                        textColor: '#666F77'
                    }
                };
                this.cfg.seriesDefaults = {
                    shadow: false,
                    lineWidth: 1,
                    stackSeries: true,
                    renderer: $.jqplot.BarRenderer,
                    pointLabels: {show: true},
                    rendererOptions: {
                        varyBarColor: true,
                        barWidth: 50,
                    },
                    markerOptions: {
                        shadow: false,
                        size: 7,
                        style: 'circle'
                    }
                }
            }

谢谢!

1 个答案:

答案 0 :(得分:1)

我找到了解决方法..我不得不在下面添加块

highlighter: { show: true, 
            showTooltip: true,      // show a tooltip with data point values.
            tooltipLocation: 'nw',  // location of tooltip: n, ne, e, se, s, sw, w, nw.
            tooltipAxes: 'y',    // which axis values to display in the tooltip, x, y or both.
            lineWidthAdjust: 2.5   // pixels to add to the size line stroking the data point marker
            }