Exemplo n.º 1
0
def showDialExample(netPlot, plotNumber):
	
  netPlot.setPlotType('dial', title="%d: Number and MAX" % (plotNumber))

  plotConfig = PlotConfig()
  plotConfig.plotName="Number"
  plotConfig.minScaleValue=0
  plotConfig.maxScaleValue=200
  plotConfig.tickCount=10
   
  netPlot.addPlot(plotConfig)
  plotConfig.plotName="MAX"
  netPlot.addPlot(plotConfig)
   
  maxV=0
  value=0
  while value < 200:
    value=value+random.randint(-10,20)
    if value > 200:
      value=200
    elif value < 0:
      value=0
    if maxV < value:
      maxV=value
    netPlot.addPlotValues([value,maxV])
    time.sleep(0.1)
Exemplo n.º 2
0
def showDialExample(netPlot, plotNumber):

    netPlot.setPlotType('dial', title="%d: Number and MAX" % (plotNumber))

    plotConfig = PlotConfig()
    plotConfig.plotName = "Number"
    plotConfig.minScaleValue = 0
    plotConfig.maxScaleValue = 200
    plotConfig.tickCount = 10

    netPlot.addPlot(plotConfig)
    plotConfig.plotName = "MAX"
    netPlot.addPlot(plotConfig)

    maxV = 0
    value = 0
    while value < 200:
        value = value + random.randint(-10, 20)
        if value > 200:
            value = 200
        elif value < 0:
            value = 0
        if maxV < value:
            maxV = value
        netPlot.addPlotValues([value, maxV])
        time.sleep(0.1)
Exemplo n.º 3
0
def timeExample1(netPlot, plotNumber):
  """Single plot on a time series chart"""
  plotConfig = PlotConfig()
  plotConfig.plotName="Plot 0"
  plotConfig.xAxisName="The X axis"
  plotConfig.yAxisName="The Y axis (Plot0)"
  plotConfig.enableLines=1
  plotConfig.enableShapes=1
  plotConfig.enableAutoScale=0
  plotConfig.minScaleValue=0
  plotConfig.maxScaleValue=10000
  plotConfig.maxAgeSeconds=5  
  plotConfig.tickCount=1000
  
  netPlot.setPlotType('time', title="%d: TIME chart, single plot" % (plotNumber) )
  #Uncomment this to remove the Legend on the chart
  #netPlot.setChartLegendEnabled(0)
  netPlot.addPlot(plotConfig)
  i=0
  while i< 10:
    netPlot.addPlotValues([random.randint(1000,10000)])
    i=i+1
Exemplo n.º 4
0
def timeExample1(netPlot, plotNumber):
    """Single plot on a time series chart"""
    plotConfig = PlotConfig()
    plotConfig.plotName = "Plot 0"
    plotConfig.xAxisName = "The X axis"
    plotConfig.yAxisName = "The Y axis (Plot0)"
    plotConfig.enableLines = 1
    plotConfig.enableShapes = 1
    plotConfig.enableAutoScale = 0
    plotConfig.minScaleValue = 0
    plotConfig.maxScaleValue = 10000
    plotConfig.maxAgeSeconds = 5
    plotConfig.tickCount = 1000

    netPlot.setPlotType('time',
                        title="%d: TIME chart, single plot" % (plotNumber))
    #Uncomment this to remove the Legend on the chart
    #netPlot.setChartLegendEnabled(0)
    netPlot.addPlot(plotConfig)
    i = 0
    while i < 10:
        netPlot.addPlotValues([random.randint(1000, 10000)])
        i = i + 1