Tips for adjusting the dimensions of my chart using JavaScript or Jquery

Utilizing DevExtreme widgets for the creation of a line chart in jQuery as shown below:


                var dataSource = [{"Date Range": "August-2018",
                Benelux: 194,
                Czech_Slovakia: 128,
                // more data...
                UKI: 249}];

                var chart = $("#chart").dxChart({
                    palette: "Soft Blue",
                    // more configurations...
                }).dxChart("instance");
            

                <link href="https://cdn3.devexpress.com/jslib/18.1.7/css/dx.common.css" rel="stylesheet"/>
                <script src="https://ajax.googleapis.com/ajax/libs/jquery/3.1.0/jquery.min.js"></script>
                <script src="https://cdn3.devexpress.com/jslib/18.2.3/js/dx.all.js"></script>
                <div id="chart"></div>
            

Everything is functioning correctly, but I aim to enhance the readability of the Y axis by enlarging the chart size.

I attempted to adjust the height using $("#chart").height("1800px"); in jQuery and CSS, however, it didn't override the default values.

I suspect utilizing the tick option to modify the Y-axis scale could be the solution, such as changing from 0,200,400... to 0,50,100..., but implementing this change has not been successful so far.

Your assistance on this matter is greatly appreciated. Thank you!

Answer №1

The DevExtreme source you referenced contains documentation for both of the options you are seeking.

If you want to adjust the axis interval size, remember that valueAxis should be treated as a single object, not an array of objects:

valueAxis: { tickInterval: 50}

You can find more information about this on the following page:

To adjust the chart size, utilize the size object which allows properties for height and width customization:

size: { height:1800}

For further details, visit:

I've provided an example using your code with the desired axis increment set to 50 and a height of 1800px in this CodePen link: https://codepen.io/anon/pen/mQrQOr

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

IntelliJ does not support the use of newlines within Vue.js component templates

While working with Vue.js in IntelliJ IDEA, I encountered a small problem related to defining component templates. The issue is that IntelliJ seems to struggle when the template spans more than one line and attempts to concatenate them together. For examp ...

Learning the ins and outs of HTML5 and CSS3

Does anyone have recommendations for high-quality HTML5 and CSS3 tutorials? ...

Having trouble implementing new controllers in AngularJS UI-Router for nested states?

I'm currently facing an issue with nested states in the ui-router. My task involves rendering a page that includes regions, countries, and individuals per country. In the index.html file, there are three regions represented as links: EMEA, APAC, and ...

In ReactJS with Bootswatch, the font styles are not applied

I have experimented with various methods to apply this font, but it is still not functioning correctly. @font-face { font-family: 'Samim'; src: local('Samim'), url(./resources/fonts/Samim.ttf) format('truetype'); fon ...

Determining when a text area has selected text without constant checking

class MarkdownEditor extends React.Component { constructor(props) { super(props); this.timer = null; this.startIndex = null; this.endIndex = null; } componentDidMount() { this.timer = setInterval(() => { this.setSelectio ...

Is there any issue that you can spot with this js / jQuery code?

Presented below is a script that prompts the user to confirm clicking a button based on a system setting. The system setting is saved in a hidden field established from the code-behind. Markup: <asp:HiddenField ID="hfConfirmOnApproval" runat="server" ...

Undefined Response Error when Utilizing Dropzone for File Upload in Express

I am currently in the process of setting up a basic image upload demonstration using Dropzone and Express. Here is what my form looks like: <form id="ul-widget" action="/fileupload" class="dropzone" enctype="multipart/form-data"> <div class="fal ...

Display two images consecutively within a single img tag

My goal is to display two images using a single <img /> tag. The first small image will be loaded and shown using the src attribute, while the second large image will be contained within the data-src attribute. Only one image will be displayed at a t ...

Jquery error caused by index variable in form validation issue

While attempting to validate 8 radio buttons, I encountered a peculiar issue related to indexing. The process involved looping through the 8 radio buttons to check if they had been selected. If all 8 buttons remained unchecked, an alert would be triggered ...

Managing user input in Node.js

Users are required to input a URL in the form (e.g: "") and I need to be able to access and read the content from that URL. I am uncertain about my current method. What should I enter in the URL field below? var options = { url: '....', ...

Issue with Angular Bootstrap Modal autofocus functionality malfunctioning

I successfully integrated a bootstrap modal using angular bootstrap into my project. If you want to check out the code I used, here is the plunker link. Inside the modal, there is only one input field (textbox) that the user needs to fill, along with sav ...

What is the best way to position images and URLs in div elements using CSS?

Currently, I am on a journey to become a Front End Developer through Udacity. As part of my learning process, I have a project that needs to be submitted. Unfortunately, I encountered some issues that I couldn't resolve on my own. Specifically, I&apos ...

Keypress Lagging woes: Latest Meteor Update

While I am updating a MongoDB model immediately upon keypress, it seems to lag behind due to the value being attached to that model. What would be the most effective way to update the model both on keypress and when refreshing the page so that the input re ...

Angular index.html file can include a conditional script

I am currently working on an Angular project, where the index.html serves as the main entry point for the application, just like in any other Angular project. This file contains important links and configurations. Within the HTML code snippet below, you w ...

Tips for successfully passing an object as a prop in nextjs

Struggling to understand how to pass an object as a prop using useState in Next JS. My javascript functions include a lorem ipsum generator, housed in a component called Paragraphs. This component requires two properties: Number of paragraphs Sentence le ...

Stack pictures on a slender DIV

I am trying to create a vertical line inside a DIV container. After that, I want to add an image on top of the vertical line (see attached picture for reference). This is what my current source code looks like: <div style="background-color:gray;width ...

What could be causing Ember/handlebars.js to prepend 'app/' to my template file names?

Whenever I try to load my Rails ember app, I encounter a frustrating issue where Ember is unable to locate the application and index templates. Ember.TEMPLATES['application] and Ember.TEMPLATES['index'] Oddly enough, when I check Ember.TEM ...

contenteditable -- Utilizing AngularJS to create a block element for the title only

When I click on an input field that is editable, I want the background color to change to white within the box. Can someone please assist me with this? Below is my code: HTML <div id="section{{section.index}}"> <h2 class="title" contentedit ...

Combine a string variable and an array object in JavaScript or AngularJS

Hey there! I'm currently attempting to combine an array, a variable, and a "." in between them. The object I receive from json is stored in data, while valuePickup represents a variable. My current approach: self.GetIndex = function (valuePickup) { ...

Executing one specific test in Protractor using Selenium

How can I execute a single test in Protractor with Selenium? describe('Login page', function() { beforeEach(function() { browser.ignoreSynchronization = true; ptor = protractor.getInstance(); }); it('should contain navigation items&ap ...