Skip to content

Commit

Permalink
Misc getting started fixes (#2775)
Browse files Browse the repository at this point in the history
  • Loading branch information
Burnett2k authored Feb 5, 2024
1 parent 3fd4144 commit 4197142
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 3 deletions.
4 changes: 3 additions & 1 deletion docs/src/content/introduction/index.md
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ In this guide, we’ll show you how to get started with Victory and walk you thr

You can do this on your own if you'd like, or you can...

* Clone down [this project we've started for you](https://github.com/FormidableLabs/victory-tutorial) using ```git clone [email protected]:FormidableLabs/victory-tutorial.git```
* Clone down [this project we've started for you](https://github.com/FormidableLabs/victory-tutorial) using `git clone [email protected]:FormidableLabs/victory-tutorial.git`
* `cd victory-tutorial`
* Replace the existing code in the `client.js` file with:

Expand Down Expand Up @@ -153,6 +153,8 @@ class App extends React.Component {
ReactDOM.render(<App/>, mountNode);
```

While the axes defaults are great, you can see there's some overlap with the y-axis and first bar. Let's fix that in the next section.

#### 6. Customize the axes

Next, let's modify the tick labels on the axes to be a little more descriptive. We can do this by adding and configuring `VictoryAxis` components to our chart, so let's import `VictoryAxis`. Import statements should now look like this:
Expand Down
4 changes: 2 additions & 2 deletions docs/src/partials/markdown/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -113,6 +113,7 @@ export function renderHeading(props) {
const slug = text
.trim()
.toLowerCase()
.replace(/^\d+\.\s*/, "") // remove leading numbers and periods
.replace(/[^\w\- ]/g, "") // Remove punctuation
.replace(/\s+/g, "-"); // Replace spaces with a dash

Expand Down Expand Up @@ -144,7 +145,6 @@ renderHeading.propTypes = {
* @param {Object} meta - meta
* @returns {Object} link element
*/
// eslint-disable-next-line react/no-multi-comp
export const renderLink = ({ href, children }) => {
if (/^\w+:/.test(href)) {
return (
Expand All @@ -161,7 +161,7 @@ renderLink.propTypes = {
href: PropTypes.string,
};

/* eslint-enable react/prop-types, no-magic-numbers */
/* eslint-enable no-magic-numbers */
const Markdown = (props) => {
const { className, source, scope, theme } = props;
/* eslint-disable react/prop-types, no-magic-numbers */
Expand Down

0 comments on commit 4197142

Please sign in to comment.