如何在实时图表中使用第四象限

时间:2019-06-19 01:09:01

标签: livecharts

在wpf中使用实时图表时,我有两个问题;

1使用基本列。当我设置Zoom = X并向左移动时,它将显示负半轴,这与需求不匹配。

SELECT COLOR FROM(
SELECT COLOR,
ROW_NUMBER() OVER(PARTITION BY COLOR ORDER BY COLOR)  AS RN
FROM #TEMP_A
) AS X
ORDER BY RN,COLOR
 <lvc:CartesianChart Series="{Binding SeriesCollection}" LegendLocation="Left" Height="313" Zoom="x">
                <lvc:CartesianChart.AxisX>
                    <lvc:Axis Title="Salesman" Labels="{Binding Labels}"></lvc:Axis>
                </lvc:CartesianChart.AxisX>
                <lvc:CartesianChart.AxisY>
                    <lvc:Axis Title="Sold Apps" LabelFormatter="{Binding Formatter}"></lvc:Axis>
                </lvc:CartesianChart.AxisY>
            </lvc:CartesianChart>
public Ztest()
        {
            InitializeComponent();
            SeriesCollection = new SeriesCollection
            {
                new ColumnSeries
                {
                    Title = "2015",
                    Values = new ChartValues<double> { 10, 50, 39, 50 }
                }
            };


            Labels = new[] { "Maria", "Susan", "Charles", "Frida" };
            Formatter = value => value.ToString("N");

            DataContext = this;
        }
        public SeriesCollection SeriesCollection { get; set; }
        public string[] Labels { get; set; }
        public Func<double, string> Formatter { get; set; }

2使用基本行图


        | 
       4|
       3|                  |
       2|                  |
       1|                  |  |  |
       ———————————————————————————————————————————————
        May Joy Tom      Tom Joy May

我想要这个:

 now: 
     |
     |
 May |---------
 Joy |------
 Tom |----
    ________________________
     0  1  2  3  4
 Tom |----
 Joy |------
 May |---------
     |
     |
    ________________________
     0  1  2  3  4
Or:

0 个答案:

没有答案