Tips for Generating Tick Marks and Ensuring Uniform Spacing on a Circular Gauge

I am a web developer currently working on designing a front-end dashboard. I have the challenge of developing a radial gauge completely from scratch using just pure JQuery, JavaScript, and CSS styling - no plugins allowed. The task at hand is to add tick marks representing the minimum and maximum values from 0 to 100 on the gauge. Any assistance with this would be greatly appreciated.

  1. Tick Marks showing Min Value and Max Value from 0 to 100.

body {
  background: #fff;
}

#radial:before {
  background: yellowgreen;
  border-radius: 220px 220px 0 0;
  /* box-shadow: 3px 1px 8px rgba(2, 1, 1, 0.15) inset; */
  content: "";
  height: 100px;
  position: absolute;
  width: 350px;
  
}

#radial {
  border-radius: 400px 400px 0 0;
  height: 100px;
  margin: 50px auto 0;
  overflow: hidden;
  position: relative;
  width: 200px;
  
}

#radial:after {
  background: rgb(255, 255, 255);
  border-radius: 140px 140px 0 0;
  bottom: 0;
  box-shadow: 3px 1px 8px rgba(0, 0, 0, 0.15);
  /* color: rgba(255, 80, 0, 0.7); */
  content: "";
  font-family: Lato, Helvetica Neue, Helvetica, Arial, sans-serif;
  font-size: 3.5em;
  font-weight: 100;
  height: 70px;
  left: 30px;
  line-height: 95px;
  position: absolute;
  text-align: center;
  width: 140px;
  
}

#needle {
  background: radial-gradient(black, red);
  border-radius: 8px;
  bottom: -4px;
  /* box-shadow: 3px -1px 4px rgba(0, 0, 0, 0.4); */
  display: block;
  height: 8px;
  position: absolute;
  width: 100px;
  transform-origin: 100% 4px;
  transform: rotate(0deg);
  transition:8s ;
  z-index: 2;
  /* border-top-left-radius: 5px;
  border-top-right-radius: 5px; */
  clip-path: polygon(100% 0%, 0% 50%, 100% 100% );
  
}

#radial:hover span {
  transform: rotate(180deg);
}

/* h1,
p,
strong {
  display: block;
  font-family: Lato;
  text-align: center;
}

h1 {
  margin-bottom: 0.1em;
}

p {
  margin-top: 0;
}

strong {
  color: #be1e1e;
  font-size: 2.5em;
} */
<html>
    <head>
        <tite></tite>

        <link rel="stylesheet" href="GaugeCss_last.css">
        <!-- <script type="text/javascript"></script> -->
    </head>

    <head>
        
    </head>

    <body>
            <div id="radial" data-value="0">
            <span id="needle" value="8"></span>
            <span id="spacing"></span>
            </div>
        
        
    </body>
    
</html>

Similar questions

If you have not found the answer to your question or you are interested in this topic, then look at other similar questions below or use the search

Looping through the json resulted in receiving a null value

When working with typescript/javascript, I encountered an issue while trying to fetch the 'statute' from a data object: {_id: "31ad2", x: 21.29, y: -157.81, law: "290-11",....} I attempted to assign data.law to a variable, but received a typeer ...

Retrieve the targeted row from the table and then employ a function

Here is a datatable that I am working on: http://jsbin.com/OJAnaji/15/edit I initially populate the table with data and display it. Then, I add a new column called "kontrole." data = google.visualization.arrayToDataTable([ ['Name', &apo ...

What is the best way to find the vertex positions of a JSON model in

Here is the code I am using to load a 3D model in THREE.js: var noisenormalmap = THREE.ImageUtils.loadTexture( "obj/jgd/noisenormalmap.png" ); noisenormalmap.wrapS = THREE.RepeatWrapping; noisenormalmap.wrapT = THREE.RepeatWrapping; noisenormalmap.repeat. ...

Tips for Expanding the Height of a Parent Div to Fill Its Containing Parent

I am experiencing some difficulty with a seemingly simple task. My goal is to have the lime-colored background expand and fill 100% of the current height of its parent container (in this case, the magenta-colored section). Here is a live example: https:/ ...

What specific types of errors is this try-catch block designed to catch and manage?

// This function establishes a connection to MongoDB using Mongoose const connectToDatabase = (url) => { return mongoose.connect(url, { useNewUrlParser: true, useUnifiedTopology: true }) .then(() => console.log('Conn ...

When the screen size decreases, display the title on two lines

Currently, I am in the process of developing a react web application with the assistance of redux. My main objective is to ensure that the page is highly responsive. At this point, there is a title positioned at the top displaying: Actions to do: Past due ...

Utilizing data attributes instead of IDs for connecting buttons and tabs in Javascript tab navigation

I'm currently exploring a new approach to creating Javascript tabs by utilizing data attributes instead of IDs to connect the tab with its content. Here's the concept in action: When clicking on a <button class="tab" data-tab-trigger="1"> ...

What is the method for specifying a JSON object within a DOM element's `data` attribute?

In an attempt to store JSON data within a dataset attribute, I encountered the following HTML structure: The appearance of the HTML is as follows <div data-switch="true" data-json="{'key1': 'value 1'}, {'key2': 'valu ...

Making Life Easier with Netsuite: Streamlining Deposit Generation

Recently, I developed a Suitelet to streamline the process of applying deposits for Cash Sales. The idea was for users to upload a CSV file containing Cash sales records, which the script would automatically use to apply the deposits and create deposit r ...

Accessing a key from an object dynamically in a React list and resolving key error issues in React

I encountered two challenges: I am currently retrieving JSON data from APIs. [ { "title": "Basic Structures & Algoritums", "lesson_id": 3, "topics": { "Title": &q ...

Retrieving Website Information through JSON

URL: I am using python to retrieve data from the JSON file linked above. I need assistance in extracting the value of "*". Typically, I would be able to access the page content directly without needing the page ID, but in this case, I seem to have encount ...

unable to bypass mongoose nested documents

I'm currently working with mongoose and node in an effort to paginate data from sub-documents. I've managed to limit the subdocuments, but skipping them seems to be a challenge. The specific versions I'm using are: Mongo 3.0.0 Node 0.10.3 ...

Having difficulty retrieving query or JSON keys from the Prometheus HTTP Server

I am trying to retrieve a specific metric called zcash_difficulty_gauge from the Prometheus HTTP Server, but I am encountering two issues: i) JSON data is not available ii) The request URL does not return just the desired metric, instead it returns the ent ...

What is the reason behind Vue not updating the array order in $ref when unshift is used?

Here's an interesting example to ponder: <template> <div> <button @click="addItem">Add Item</button> <h1>Fruits</h1> <ul> <li v-for="(item, index) in items" ...

The model.find operation is failing to retrieve the necessary fields from the database

When I execute console.log(correct.password), it returns undefined, even though the if condition results in false. app.post('/login' , async (req , res)=> { const correct = data.findOne({name : req.body.name}).select({name : 0}); if(!c ...

Guide on integrating an event in Angular 4 to an HTML element inserted using an external library

Recently, I integrated the jQuery wizard library into my project to streamline user interactions. One of the key features it provides is automatically adding next and back buttons to guide users through the wizard process. You can find more information abo ...

Ajax updates previous text to new text upon successfully completing the task

I have a question regarding changing text using AJAX after success. I have written this AJAX code which is functioning properly. However, I aim to replace the old text with new text in the .chnged div. For instance: <input type="text" name="text" va ...

Aligning text vertically in a div using Bootstrap, alongside additional content within the same div

I'm attempting to vertically align some text within a div that also contains an image. When I apply the classes "d-flex align-items-center," the text does move to the center, but it appears slightly shifted towards the top. How can I fix this issue? ...

Navigating through dictionary items in Python

I have been working with Twitter data, collecting it by monitoring the Twitter stream and saving the results in a *.txt file. To manipulate this text file using Python, I use the json.loads() function to convert each line in the file into a JSON object. ...

Transform PHP array into JSON format utilizing multi-dimensional arrays

I have a PHP array that I am attempting to convert to JSON. Here is my code: $c = array(); $c = array( $c['cronjobs'] = array( 'id'=>1189515, 'groupId'=>12379, ), ); $json = json_encode($c); echo $json; Thi ...