visifire 控件相关属性设置

Chart 部分
A:
<vc:Chart x:Name="HourlyChart"  Theme="Theme1" Grid.Row="1"  xmlns:vc="clr-namespace:Visifire.Charts;assembly=SLVisifire.Charts" Margin="5" AnimatedUpdate="true"  IndicatorEnabled="True" ZoomingEnabled="True" ZoomOutText="返回"  ShowAllText="退出" >
AnimatedUpdate:是否动画更新  
IndicatorEnabled:是否显示指标(如图中第一个)
ZoomingEnabled:是否可以缩放, ZoomOutText:设置返回上一次缩放操作文本,ShowAllText:设置退出缩放文本
ScrollingEnabled:滚动条是否可用
View3D:是否3D显示
LightingEnabled :是否高亮显示

B: 设置图标题标题
<vc:Chart.Titles> 
 <vc:Title FontSize="16" Text="测试标题" Padding="6"/> 
</vc:Chart.Titles> 
C:固定设置图例样式和图例颜色(图例一般根据数据自动生成)
    <vc:Chart.Legends >
      <vc:Legend    Margin="0,9,-52,0" Height="148" VerticalAlignment="Top"  HorizontalAlignment="Right" Width="44" >
            <vc:Legend.Template>
                  <ControlTemplate>
                 <!—图例样式—>
                  </ControlTemplate>
             </vc:Legend.Template>
      </vc:Legend>
   </vc:Chart.Legends>
DataSeries:数据集
RenderAs:  设置图表显示类型,(枚举值) 设置如:RenderAs = RenderAs.Spline
     LabelEnabled 是否显示图表中的文本,文本显示样式LabelStyle="Inside" [LabelStyle=LabelStyles.Inside] 表示文字内嵌 LabelText = "#YValue" //设置
	 Bevel 是否斜面显示
在RenderAs 设置为Spline时  
MarkerType可以设置 节点样式如实例 中的第六个

DataPoint 数据点
    A:  Title 文本 ,ValueFormatString:XValue数据格式化,IntervalType 间隔方式(枚举值),Interval 间隔值
       <vc:Chart.AxesX> 
        <vc:Axis Title="Month" ValueFormatString="d/MMM" IntervalType="Months" Interval="1"> 
          <vc:Axis.Grids> 
            <vc:ChartGrid Interval="0.2" InterlacedColor="#0Ae66e6e"  /> 
          </vc:Axis.Grids> 
        </vc:Axis> 
    </vc:Chart.AxesX> 
     Logarithmic:y轴刻度对数启用,LogarithmBase:对数基数, Prefix设置y轴文本前缀
    <vc:Chart.AxesY> 
        <vc:Axis Interval="1" Title="Market Share" Logarithmic="True" LogarithmBase="5" LineThickness="0"> 
          <vc:Axis.Grids> 
            <vc:ChartGrid Interval="0.2" InterlacedColor="#0Ae66e6e" /> 
          </vc:Axis.Grids> 
        </vc:Axis> 
    </vc:Chart.AxesY>  
具体样式参看第三个图
B: 数据格式化显示
    
   XValue的值格式化:
在DataSeries中使用XValueFormatString格式化文本,显示结果控制显示的是鼠标放上去后tooltips显示的值的文本样式;如下图 XValueFormatString=”hh:mm:ss”
在如下代码中设置 控制的是 X轴文本显示样式 如下图
<vc:Chart.AxesX>
              <vc:Axis IntervalType="Hours" Title="Hours" ValueFormatString="hh:mm tt"/>
       </vc:Chart.AxesX>
 
  
设置XValueType当前值的类型(枚举值);



评论 2
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包

打赏作者

seelingzheng

你的鼓励将是我创作的最大动力

¥1 ¥2 ¥4 ¥6 ¥10 ¥20
扫码支付:¥1
获取中
扫码支付

您的余额不足,请更换扫码支付或充值

打赏作者

实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值