动态数据显示等值线白边

发布于 2025-01-03 08:51:46 字数 1617 浏览 1 评论 0原文

我有一个如下所示的图表: Graph

我希望它看起来像这样: 在此处输入图像描述

我一直在使用动态数据显示的等值线库来实现此目的。

问题是在右上角,该区域是彩色的,即使该区域中的所有值都是 0(这就是等值线停止的原因)。 有谁知道是否有办法可以调整我的 .xaml 文件,以便该区域只显示白色背景颜色?

预先感谢您,

CX

我当前的 .xaml 文件如下所示:

<Window x:Class="IntensityChart.Window1"
    xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
    xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
    xmlns:d3="http://research.microsoft.com/DynamicDataDisplay/1.0"
    Title="DynamicDataDisplay Sample - Intensity Chart" WindowState="Maximized"
    Icon="{x:Static d3:D3IconHelper.DynamicDataDisplayWhiteIcon}">
<Grid>
    <Grid.ColumnDefinitions>
        <ColumnDefinition Width="Auto"/>
        <ColumnDefinition Width="*"/>
    </Grid.ColumnDefinitions>
    <Grid.RowDefinitions>
        <RowDefinition Height="*"/>
        <RowDefinition Height="Auto"/>
    </Grid.RowDefinitions>

    <d3:ChartPlotter Name="plotter" Grid.Row="0" Grid.Column="1">
        <d3:ViewportHostPanel>
            <Image Name="image" d3:ViewportPanel.ViewportBounds="0,0,2,1.5" Stretch="Fill"/>
        </d3:ViewportHostPanel>

        <d3:IsolineGraph Name="isolineGraph"/>
        <d3:IsolineTrackingGraph Name="trackingGraph"/>
        <d3:CursorCoordinateGraph/>

        <d3:CursorCoordinateGraph/>
        <d3:AxisCursorGraph/>
    </d3:ChartPlotter>

</Grid>

I've got a graph that looks like this:
Graph

And I want it to look like this:
enter image description here

I've been using Dynamic Data Display's Isoline library for this.

The issue is that in the upper-right corner, the area is colored, even though all values in that area are 0 (hence why the isolines stop).
Does anyone know if there is a way I can adapt my .xaml file so that area will just display a white background color?

Thank you in advance,

CX

My current .xaml file looks like this:

<Window x:Class="IntensityChart.Window1"
    xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
    xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
    xmlns:d3="http://research.microsoft.com/DynamicDataDisplay/1.0"
    Title="DynamicDataDisplay Sample - Intensity Chart" WindowState="Maximized"
    Icon="{x:Static d3:D3IconHelper.DynamicDataDisplayWhiteIcon}">
<Grid>
    <Grid.ColumnDefinitions>
        <ColumnDefinition Width="Auto"/>
        <ColumnDefinition Width="*"/>
    </Grid.ColumnDefinitions>
    <Grid.RowDefinitions>
        <RowDefinition Height="*"/>
        <RowDefinition Height="Auto"/>
    </Grid.RowDefinitions>

    <d3:ChartPlotter Name="plotter" Grid.Row="0" Grid.Column="1">
        <d3:ViewportHostPanel>
            <Image Name="image" d3:ViewportPanel.ViewportBounds="0,0,2,1.5" Stretch="Fill"/>
        </d3:ViewportHostPanel>

        <d3:IsolineGraph Name="isolineGraph"/>
        <d3:IsolineTrackingGraph Name="trackingGraph"/>
        <d3:CursorCoordinateGraph/>

        <d3:CursorCoordinateGraph/>
        <d3:AxisCursorGraph/>
    </d3:ChartPlotter>

</Grid>

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(1

初熏 2025-01-10 08:51:46

我对等值线的研究不多,但根据我所了解的信息,看起来您必须更改用于图形的调色板类。 D3 讨论板上有一个讨论概述了解决方案。

讨论

您可以听取那里的建议并根据您的数据创建一个比率,或者您可以得到在源代码和调色板类中,告诉所有 0 值都用白色着色。

I haven't worked much with Isolines, but based on the information I DO know about it, it looks like you'll have to change the palette class you use for your graph. There is a discussion that outlines a solution on the D3 discussion board.

Discussion

You could take the advice there and create a ratio based on your data, or you could just get to the source and in your palette class, tell all 0 values to be coloured with white.

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文