It is currently March 28th, 2024, 7:23 pm

How would I change a Histogram & other data from Dynamic to Static?

General topics related to Rainmeter.
Arminius
Posts: 6
Joined: June 1st, 2017, 2:06 pm

How would I change a Histogram & other data from Dynamic to Static?

Post by Arminius »

This is the code I'm using.

Code: Select all

[Rainmeter]
Update=1000
OnRefreshAction=[!AutoSelectScreen "1"]   -- This is critical for multiple monitor set-up

[Metadata]
Name=SK Neon Meters
Author=Stormknight
Information=Displays system information across top of the screen in dynamic sized meters.
License=Creative Commons Attribution-Non-Commercial-Share Alike 3.0
Version=1.0

[Variables]
Page=1;
@Include=Config\Styles.inc
@Include2=Config\Config.inc

; This is mostly positioning calculations, as they just wouldn't work when performed inline as part of the shape command etc. :(
BoxWidth=145
BoxHeight=70
BoxPos1 = 395

[StyleGraphLabels]
Padding=15,5,15,5
FontColor=220,220,220
SolidColor=0,0,0,150
FontSize=8
FontFace=Segoe UI
StringStyle=BOLD
StringAlign=CENTER
AntiAlias=1

[StyleGraphData]
Padding=15,5,15,5
FontColor=220,220,220
SolidColor=0,0,0,150
FontSize=8
FontFace=Segoe UI
StringStyle=BOLD
StringAlign=CENTER
AntiAlias=1

; ====================================
; ========== BOX 1 - CPU LOAD ========
; ====================================

; This is the rectangle that each graph sits within.
[MeterOutlineBox1]
Meter=Shape
Shape=Rectangle #BoxPos1#,25,#BoxWidth#,50 | Fill Color 0,0,0,0 | StrokeWidth 1 | Stroke Color #CPUcolor#,255

; Gets data from the rainmeter - this is CPU LOAD.
[MeasureDataBox1]
Measure=CPU

; Gets data for specific cores for quad core etc
[MeasureCPU1]
Measure=CPU
Processor=1

[MeasureCPU2]
Measure=CPU
Processor=2

[MeterGraphLineBox1]
Meter=Line
MeasureName=MeasureDataBox1
X=#BoxPos1#
Y=25r
W=#BoxWidth#
H=50
LineCount=1
LineColor=#CPUcolor#,255
SolidColor=#BACKcolor#
AntiAlias=1
LineWidth=2
GraphOrientation=Vertical

[MeterHistogramBox1]
Meter=Histogram
MeasureName=MeasureDataBox1
X=0r
Y=0r
W=#BoxWidth#
H=50
PrimaryColor=#CPUcolor#,60
AntiAlias=1
GraphOrientation=Vertical

[MeterDataTextBox1]
Meter=String
MeterStyle=StyleGraphData
MeasureName=MeasureCPU1
MeasureName2=MeasureCPU2
X=(#BoxWidth#/2)+#BoxPos1#
Y=50r
Scale=1
NumOfDecimals=0
Text=CPU Load             %1%     %2%

; ====================================
; ========== BOX 2 - MEMORY ==========
; ====================================

; This is the rectangle that each graph sits within.
[MeterOutlineBox2]
Meter=Shape
Shape=Rectangle #BoxPos1#,(#BoxHeight#+42+25),#BoxWidth#,50 | Fill Color 0,0,0,0 | StrokeWidth 1 | Stroke Color #MEMcolor#,255

; This is the text label above the graph.
[MeterLabelBox2]
Meter=String
MeterStyle=StyleGraphLabels
X=(#BoxWidth#/2)+#BoxPos1#
Y=(1*(#BoxHeight#+42))

; Gets data from the rainmeter - this is MEMORY.
[MeasureDataBox2]
Measure=PhysicalMemory
UpdateDivider=2

[MeasurePhysMemTotal]
Measure=PhysicalMemory
Total=1
UpdateDivider=3600

[MeterGraphLineBox2]
Meter=Line
MeasureName=MeasureDataBox2
X=#BoxPos1#
Y=25r
W=#BoxWidth#
H=50
LineCount=1
LineColor=#MEMcolor#,255
SolidColor=#BACKcolor#
AntiAlias=1
LineWidth=2
GraphOrientation=Vertical

[MeterHistogramBox2]
Meter=Histogram
MeasureName=MeasureDataBox6
X=0r
Y=0r
W=#BoxWidth#
H=50
PrimaryColor=#MEMcolor#,60
AntiAlias=1
GraphOrientation=Vertical

[MeterDataTextBox2]
Meter=String
MeterStyle=StyleGraphData
MeasureName=MeasureDataBox2
MeasureName2=MeasurePhysMemTotal
X=(#BoxWidth#/2)+#BoxPos1#
Y=53r
AutoScale=1
NumOfDecimals=1
Text="Memory       %1B / %2B"


; ====================================
; ========== BOX 3 - NETWORK IN ======
; ====================================

; This is the rectangle that each graph sits within.
[MeterOutlineBox3]
Meter=Shape
Shape=Rectangle #BoxPos1#,(2*(#BoxHeight#+42)+25),#BoxWidth#,50 | Fill Color 0,0,0,0 | StrokeWidth 1 | Stroke Color #NETcolor#,255

; This is the text label above the graph.
[MeterLabelBox3]
Meter=String
MeterStyle=StyleGraphLabels
X=(#BoxWidth#/2)+#BoxPos1#
Y=(2*(#BoxHeight#+42))

; Gets data from the rainmeter - this is NETWORK.
[MeasureDataBox3]
Measure=NetIn
Interface=Best
UpdateDivider=2

[MeterGraphLineBox3]
Meter=Line
MeasureName=MeasureDataBox3
X=#BoxPos1#
Y=25r
W=#BoxWidth#
H=50
LineCount=1
LineColor=#NETcolor#,255
SolidColor=#BACKcolor#
AntiAlias=1
LineWidth=2
AutoScale=1
GraphOrientation=Vertical

[MeterHistogramBox3]
Meter=Histogram
MeasureName=MeasureDataBox3
X=0r
Y=0r
W=#BoxWidth#
H=50
PrimaryColor=#NETcolor#,60
AntiAlias=1
AutoScale=1
GraphOrientation=Vertical

[MeterDataTextBox3]
Meter=String
MeterStyle=StyleGraphData
MeasureName=MeasureDataBox3
X=(#BoxWidth#/2)+#BoxPos1#
Y=53r
AutoScale=1
NumOfDecimals=1
Text="Network In                     %1"

; ====================================
; ========== BOX 4 - NETWORK OUT =====
; ====================================

; This is the rectangle that each graph sits within.
[MeterOutlineBox4]
Meter=Shape
Shape=Rectangle #BoxPos1#,(3*(#BoxHeight#+42)+25),#BoxWidth#,50 | Fill Color 0,0,0,0 | StrokeWidth 1 | Stroke Color #NETcolor#,255

; This is the text label above the graph.
[MeterLabelBox4]
Meter=String
MeterStyle=StyleGraphLabels
X=(#BoxWidth#/2)+#BoxPos1#
Y=(3*(#BoxHeight#+42))

; Gets data from the rainmeter - this is NETWORK.
[MeasureDataBox4]
Measure=NetOut
Interface=Best
UpdateDivider=2

[MeterGraphLineBox4]
Meter=Line
MeasureName=MeasureDataBox4
X=#BoxPos1#
Y=25r
W=#BoxWidth#
H=50
LineCount=1
LineColor=#NETcolor#,255
SolidColor=#BACKcolor#
AntiAlias=1
LineWidth=2
GraphOrientation=Vertical

[MeterHistogramBox4]
Meter=Histogram
MeasureName=MeasureDataBox4
X=0r
Y=0r
W=#BoxWidth#
H=50
PrimaryColor=#NETcolor#,60
AntiAlias=1
GraphOrientation=Vertical

[MeterDataTextBox4]
Meter=String
MeterStyle=StyleGraphData
MeasureName=MeasureDataBox4
X=(#BoxWidth#/2)+#BoxPos1#
Y=53r
AutoScale=1
NumOfDecimals=1
Text="Network Out                %1"

; ====================================
; ========== BOX 5 - DRIVE C: ========
; ====================================

; This is the rectangle that each graph sits within.
[MeterOutlineBox5]
Meter=Shape
Shape=Rectangle #BoxPos1#,(4*(#BoxHeight#+42)+25),#BoxWidth#,50 | Fill Color 0,0,0,0 | StrokeWidth 1 | Stroke Color #HDDcolor#,255

; This is the text label above the graph.
[MeterLabelBox5]
Meter=String
MeterStyle=StyleGraphLabels
X=(#BoxWidth#/2)+#BoxPos1#
Y=(4*(#BoxHeight#+42))

; Gets data from the Perfmon plugin - this is NETWORK.
[MeasureDataPerfmonDriveC]
Measure=Plugin
Plugin=PerfMon
PerfMonObject=LogicalDisk
PerfMonCounter="% Disk Time"
PerfMonInstance=C:
OnUpdateAction=[!UpdateMeasure MeasureDataBox5]

[MeasureDataBox5]
; Returns scaled down [MeasureDiskAccessC] measurement that represents the percent of time the given disk is processing read or write requests.
Measure=Calc
Formula=((MeasureDataPerfmonDriveC/100000) < 100 ? (MeasureDataPerfmonDriveC/100000) : 100)
MaxValue=100
MinValue=0
UpdateDivider=-1

[MeterGraphLineBox5]
Meter=Line
MeasureName=MeasureDataBox5
X=#BoxPos1#
Y=25r
W=#BoxWidth#
H=50
LineCount=1
LineColor=#HDDcolor#,255
SolidColor=#BACKcolor#
MaxValue=100
MinValue=0
AntiAlias=1
LineWidth=2
GraphOrientation=Vertical

[MeterHistogramBox5]
Meter=Histogram
MeasureName=MeasureDataBox5
X=0r
Y=0r
W=#BoxWidth#
H=50
PrimaryColor=#HDDcolor#,60
MaxValue=100
MinValue=0
AntiAlias=1
GraphOrientation=Vertical

[MeterDataTextBox5]
Meter=String
MeterStyle=StyleGraphData
MeasureName=MeasureDataBox5
X=(#BoxWidth#/2)+#BoxPos1#
Y=53r
AutoScale=1
NumOfDecimals=0
Text="Drive C:                        %1%"
The 3rd and 4th box keep changing based on what the current data is, I would rather lock them down, as in if my top download speed is 4 megabits per second, it stays at that, if nothing is downloading it will display 0.0 MB\s because all the trailing digits aren't included, the histogram is also blank, but if I start a big download then it's all maxed out.
That's what I'm hoping for.
User avatar
CyberTheWorm
Posts: 860
Joined: August 22nd, 2016, 11:32 pm
Location: Surrey, B.C., Canada

Re: How would I change a Histogram & other data from Dynamic to Static?

Post by CyberTheWorm »

Without having the config.inc file, the max speed setting might be a variable in there. Check that file and see
The only source of knowledge is experience. Albert Einstein
Deviant Art Page
Arminius
Posts: 6
Joined: June 1st, 2017, 2:06 pm

Re: How would I change a Histogram & other data from Dynamic to Static?

Post by Arminius »

CyberTheWorm wrote:Without having the config.inc file, the max speed setting might be a variable in there. Check that file and see
Here's the contents of the config.inc file, I can't see anything in it that's still being used, I didn't write any of this originally.

Code: Select all

; ====================================
; ========== SK NEON METERS ==========
; ====================================
; ========== CONFIG FILE =============
; ====================================

[Variables]

; ====================================
; ========== LAYOUT ==================
; ====================================

;Switch between these two formats for 24 hr or 12 hr clock.
; 24 Hour format
ClockFormat=%H:%M
; 12 Hour format
;ClockFormat=%#I:%M %p

; ====================================
; ========== EDITABLE COLOURS ========
; ====================================

; Define colours used for the graphs and components. These are in RGB, so just change the values from 0-255
GPUcolor = 255,59,0		; GPU:		Bright red
GPU2color = 240,255,0		; GPU 2:	Yellow
CPUcolor = 20,144,255		; CPU:		Light blue
MEMcolor = 211,0,201		; Memory:	Magenta
NETcolor = 255,140,0		; Network:	Orange
HDDcolor = 0,209,66		; Drives:	Light Green

;Defines the background colour for graphs. Note the 4th value is the alpha channel.
BACKcolor = 0,0,0,0		; Transparent
;BACKcolor = 0,0,0,128		; 50% black
;BACKcolor = 0,0,0,255		; Solid black


; ====================================
; ========== HWiNFO REGISTERS ========
; ====================================
; If any of the graphs don't work and aren't picking up data, run the application "HWiNFOSharedMemoryViewer.exe"
; in the @Resources directory.
; Find the data that you are after and amend the registers below.
; As an example, I have an nVidia GTX980, so look down the list until I find that, then open the tree view.
; I want to set the GPU load, so look for "GPU Core Load" and click on that.
; For me, that shows:
;		ID: 0xe0002000
;		Instance: 0x14
;		ID: 0x7000000

; GPU FAN
GPUFANSensorId=0xe0002000
GPUFANSensorInstance=0x14
GPUFANEntryId=0x8000000

; GPU Temp
GPUTEMPSensorId=0xe0002000
GPUTEMPSensorInstance=0x14
GPUTEMPEntryId=0x1000000

; GPU Load
GPULOADSensorId=0xe0002000
GPULOADSensorInstance=0x14
GPULOADEntryId=0x7000000

; CPU Temp
CPUTEMPSensorId=0xF0000400
CPUTEMPSensorInstance=0x0
CPUTEMPEntryId=0x100007f

; ----- For if you have a 2nd GFX card ---
; 2nd GPU FAN
GPU2FANSensorId=0xe0002000
GPU2FANSensorInstance=0x14
GPU2FANEntryId=0x8000000

; 2nd GPU Temp
GPU2TEMPSensorId=0xe0002000
GPU2TEMPSensorInstance=0x14
GPU2TEMPEntryId=0x1000000

; 2nd GPU Load
GPU2LOADSensorId=0xe0002000
GPU2LOADSensorInstance=0x14
GPU2LOADEntryId=0x7000000
User avatar
Bananorpion
Posts: 40
Joined: April 16th, 2017, 8:35 pm

Re: How would I change a Histogram & other data from Dynamic to Static?

Post by Bananorpion »

Maybe I'm missing something, but if you want a histogram to go static, just replace it with an image.
Arminius
Posts: 6
Joined: June 1st, 2017, 2:06 pm

Re: How would I change a Histogram & other data from Dynamic to Static?

Post by Arminius »

Bananorpion wrote:Maybe I'm missing something, but if you want a histogram to go static, just replace it with an image.
No that's not what I ment, I just want the maximum value to go static, as in it's always a percentage of 4megabit's per second for example.
User avatar
balala
Rainmeter Sage
Posts: 16110
Joined: October 11th, 2010, 6:27 pm
Location: Gheorgheni, Romania

Re: How would I change a Histogram & other data from Dynamic to Static?

Post by balala »

Arminius wrote:No that's not what I ment, I just want the maximum value to go static, as in it's always a percentage of 4megabit's per second for example.
Try to add MinValue and MaxValue options to the [MeasureDataBox3], respectively [MeasureDataBox4] measures.