色谱柱系列在x轴的不同间隔上具有不同颜色的色谱柱是否填充相同的色谱柱系列? [英] Column Series With different color on a different interval at x-axis fill in same series?

查看:105
本文介绍了色谱柱系列在x轴的不同间隔上具有不同颜色的色谱柱是否填充相同的色谱柱系列?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我正在尝试实现速度/时间图用户界面,我将wto与MVVM模式和beto-rodriguez的实时图表一起用作我的图库. 我正在使用列系列.

I'm trying to implement a speed/time plot UI, i'm using WPF with the MVVM Pattern and Live-Charts by beto-rodriguez as my plot library. I am using Column Series.

我有两个问题: 1)我必须在X轴的中间开始该系列该怎么做?例如,如果我将最小值设置为7,则图形将x轴以7作为第一个点作为起点,但我希望x-轴从1开始,但图形绘制应从7开始.

i have two issues: 1) i have to start the series in middle of the x-axis how to do this? e.g if i set the min value as 7 the graph starts the x axis as 7 taking it the first point but i want x - axis to start at 1 but graph plotting should start at 7.

2)我必须在一定条件下更改系列的颜色,例如当x = 10时我希望将其显示为蓝色,而当x = 17时我只希望针对该值显示相同的系列为粉红色在任何时候它都应该是原始颜色.

2) i have to change the color of the series at a certain condition say when x= 10 i want it to be shown as blue but when x= 17 i want to show the same series as pink only for that value rest at all points it should be of the original color.

任何指针?

推荐答案

您有几个选择:

对每个点使用不同的序列:

Use a different series for every point:

<lvc:CartesianChart>
   <lvc:CartesianChart.Series>
      <lvc:ColumnSeries Fill="Red" />
      <lvc:ColumnSeries Fill="Blue" />

您可以使用通过映射器设置它们,例如: https://lvcharts.net/App/examples/v1/wpf/Point%20State

You can use set them using a mapper, for example: https://lvcharts.net/App/examples/v1/wpf/Point%20State

这篇关于色谱柱系列在x轴的不同间隔上具有不同颜色的色谱柱是否填充相同的色谱柱系列?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆