【问题标题】:How to highlight Data Points Always in a Line Chart with NGRX?如何使用 NGRX 始终在折线图中突出显示数据点?
【发布时间】:2023-03-05 12:53:02
【问题描述】:

我有一个显示线系列的折线图。

如何始终突出显示数据点?

目前只有当鼠标悬停时才会高亮显示一个数据点。

<ngx-charts-line-chart
  class="chart-container"
  [scheme]="colorScheme"
  [schemeType]="schemeType"
  [results]="results"
  [animations]="animations"
  [legend]="true"
  [legendTitle]="legendTitle"
  [legendPosition]="legendPosition"
  [gradient]="gradient"
  [xAxis]="showXAxis"
  [yAxis]="showYAxis"
  [showXAxisLabel]="showXAxisLabel"
  [showYAxisLabel]="showYAxisLabel"
  [xAxisLabel]="xAxisLabel"
  [yAxisLabel]="yAxisLabel"
  [autoScale]="true"
  [xScaleMin]="xScaleMin"
  [xScaleMax]="xScaleMax"
  [yScaleMin]="yScaleMin"
  [yScaleMax]="yScaleMax"
  [timeline]="timeline"
  [showGridLines]="true"
  [roundDomains]="true"
  [curve]="curve"
>
</ngx-charts-line-chart>

或者是否有任何其他图表类型可以在图表上提供数据点? 我测试了气泡图,但它只适用于时间和数字作为 X 轴。我需要使用一个字符串作为 X 轴。

【问题讨论】:

标签: angular linechart ngx-charts datapoint


【解决方案1】:

在你的 sass 中尝试这些行:

chart-container {
    .line-highlight {
       display: block;
     }
}

【讨论】:

    猜你喜欢
    • 1970-01-01
    • 1970-01-01
    • 2017-09-12
    • 1970-01-01
    • 2018-01-22
    • 1970-01-01
    • 2010-10-03
    • 1970-01-01
    • 1970-01-01
    相关资源
    最近更新 更多