首页 文章

将时间轴设置到图表顶部(Google可视化图表)

提问于
浏览
0

我正在为我的网络应用程序使用谷歌可视化图表(时间线).. https://developers.google.com/chart/interactive/docs/gallery/timeline

任何人都可以建议一个解决方案,将时间轴栏放到图表的顶部 . 目前,时间轴栏位于图表的底部..(如下图所示) .

谢谢
enter image description here

1 回答

  • 1

    似乎没有配置选项可以在图表顶部设置时间轴 .

    从谷歌网站的例子我得到了以下时间轴的SVG代码(数字1790和1800):

    <g>
        <text text-anchor="middle" x="NaN" y="NaN" font-family="undefined" font-size="0" stroke="none" stroke-width="0" fill-opacity="1" fill="none"></text>
        <text text-anchor="middle" x="122.44134100696262" y="144.026" font-family="Arial" font-size="13" stroke="none" stroke-width="0" fill="#000000">1790</text>
        <text text-anchor="middle" x="528.1048013844729" y="144.026" font-family="Arial" font-size="13" stroke="none" stroke-width="0" fill="#000000">1800</text>
    </g>
    

    它位于时间线图的主要SVG代码之后 . 有可能在图表之前使用一些查询/删除/位置“手动”移动它,但这可能容易出错 .

相关问题